$str=~s/(iteration)(.*)/<B> /U$1/E$2 <\/B>/g;It is recommendable to test your code before posting it here. Your snippet produces a syntax error, and you need to use backslashes, not forward slashes.
In reply to Re^2: Calling a function in regex substitution
by bart
in thread Calling a function in regex substitution
by narainhere
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |