| Recommend this page to a friend! |
| Packages of Michael Beck | Xoops 2.5 | htdocs/xoops_lib/vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-regex-replace.md | Download |
|
|||||||||||||||||||||
regex_replaceA regular expression search and replace on a variable. Use the
Basic usage
> Note > > Although Smarty supplies this regex convenience modifier, it is > usually better to apply regular expressions in PHP, either via custom > functions or modifiers. Regular expressions are considered application > code and are not part of presentation logic. Parameters| Parameter Position | Type | Required | Description | |--------------------|--------|----------|------------------------------------------------| | 1 | string | Yes | This is the regular expression to be replaced. | | 2 | string | Yes | This is the string of text to replace with. | Examples
Where template is: Will output:
|