more useful options | |
PerlMonks |
Re: Really basic regex question!by AnomalousMonk (Archbishop) |
on Mar 24, 2016 at 06:13 UTC ( [id://1158695]=note: print w/replies, xml ) | Need Help?? |
Your $code string seems to have newlines in it, and by default, . (dot) (update: in the .*? regex expression) does not match newlines. Try using the /s (dot matches all) regex modifier on your substitution. Update: Please see Modifiers; s/// in Regexp Quote-Like Operators. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|