in reply to Regexp::Common not so common?
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///.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regexp::Common not so common?
by massa (Hermit) on Aug 14, 2008 at 14:34 UTC |