By using something other than / as a delimiter for the outer substitution, I avoided having to backslash the literal /s.$string =~ s{<tag>(.*?)</tag>} {(my $x = $1) =~ s/\n/<br>/g; "<tag>$x</tag>"}gise;
In reply to Re: Editting Part of Regex
by chipmunk
in thread Editting Part of Regex
by mt2k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |