good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: File Find/Replace with the replacement coming from part of earlier matched stringby tmharish (Friar) |
on Feb 05, 2013 at 06:25 UTC ( [id://1017069]=note: print w/replies, xml ) | Need Help?? |
RegEx on multiple lines that might be large with look-ahead can really slow things down. There is no need to hold onto chunks of anything - all you need is the PC name and you are fine up to when you see the next PC name. The following chunk of code does that:
OUTPUT:
In Section
Seekers of Perl Wisdom
|
|