Replaces the search string by the replace string using regular expressions
<?php
regex_replace(string $value, string $search, string $replace)
Note that if you want to use backreferences, use
\$1
instead of$1
,\$2
for$2
and so on, otherwise Dwoo will replace the$1
as if it was a variable.
Example #1
{regex_replace "abcdABCD" "/([a-z])/" "\$1*"}
The above example will output:
a*b*c*d*ABCD