modifier.regex_replace.php
Plugin from smarty project and adapted for jtpl
Tags
Table of Contents
- jtpl_modifier_common_regex_replace() : string
- modifier plugin : regular epxression search/replace
Functions
jtpl_modifier_common_regex_replace()
modifier plugin : regular epxression search/replace
jtpl_modifier_common_regex_replace(string $string, string|array<string|int, mixed> $search, string|array<string|int, mixed> $replace) : string
You should provide two arguments, like the first both of preg_replace {$mystring|regex_replace:'/(\w+) (\d+), (\d+)/i':'${1}1,$3'}
Parameters
- $string : string
- $search : string|array<string|int, mixed>
- $replace : string|array<string|int, mixed>