I don't believe you can join two regex's together using string concatenation. If you spell it out, it works:
$teststring =~ s/hello\s*$RE{balanced}{-parens=>'{ }'}\s*$RE{balanced} +{-parens=>'{ }'}/hi/; #teststring: start hi end
(Except you didn't have any capture parentheses in your original s///.)
In reply to Re: Regexp::Common not so common?
by FunkyMonk
in thread Regexp::Common not so common?
by iaw4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |