in reply to Re: Calling a function in regex substitution
in thread Calling a function in regex substitution

$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.