you can use $regsubex() to perform substitutions on the portions of the text matched by your regular expression:

Code:
$regsubex($1-, /(cow|dog|fox|pigs)/gi, $chr(3) $+ 4\1$chr(15))


the 'g' modifier tells the regex engine to continue past the first successful match. \1 in the 3rd (substitution) parameter returns the substring captured by the first (group) in the expression.


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde