Files
smarty/libs/plugins/modifier.regex_replace.php

30 lines
592 B
PHP
Raw Normal View History

2002-01-31 20:49:40 +00:00
<?php
/**
2002-01-31 20:49:40 +00:00
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty regex_replace modifier plugin
*
* Type: modifier<br>
* Name: regex_replace<br>
2002-01-31 20:49:40 +00:00
* Purpose: regular epxression search/replace
* @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
* regex_replace (Smarty online manual)
* @param string
* @param string|array
* @param string|array
* @return string
2002-01-31 20:49:40 +00:00
*/
function smarty_modifier_regex_replace($string, $search, $replace)
{
return preg_replace($search, $replace, $string);
}
/* vim: set expandtab: */
?>