Problems? Is your data what you think it is? | |
PerlMonks |
Re^2: Advanced replace functionby ikegami (Patriarch) |
on Dec 04, 2009 at 19:49 UTC ( [id://811153]=note: print w/replies, xml ) | Need Help?? |
There was nothing about newlines being disallowed in the brackets. The following is faster and more likely to match correctly:
But that's risky, especially if you use it a larger pattern. The /.*?/ could match a "[" or a "]". That's obviously undesirable. The following pattern avoids that problem:
In Section
Seekers of Perl Wisdom
|
|