Get Smarty



Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty


Get the juciest casino bonuses at this great website

If you are looking for great entertainment online, then we would like to recommend Find the best casino bonus available and much more that makes your casino experience much more enjoyable!


Posición del Parametro Tipo requerido Default Descripción
1 string Si n/a Esta es la expresión regular a ser substituida.
2 string Si n/a Esta es la cadena que sustituira a la expresión regular.

Localiza una expresión regular y la remplaza en la variable. Use la sintaxis para preg_replace() del manual de PHP.

Example 5.14. regex_replace


$smarty->assign('articleTitle', "Infertility unlikely to\nbe passed on, experts say.");



Donde index.tpl es:

{* replace each carriage return, tab and new line with a space *}

{$articleTitle|regex_replace:"/[\r\t\n]/":" "}


Esta es la salida:

Infertility unlikely to
be passed on, experts say.
Infertility unlikely to be passed on, experts say.


Vea también replace y escape.

No comments for this page.