The stupid question is the question not asked | |
PerlMonks |
Re^2: FAST way to pull multiple lines around a keywordby rizzy (Sexton) |
on Oct 19, 2010 at 19:10 UTC ( [id://866156]=note: print w/replies, xml ) | Need Help?? |
Thanks. I think I may do what you suggest. One thing I did which DID speed things up very much was add a line break (/n) at the beginning and end of the match. That way there is only one possible match (for each keyword). What it was doing before was taking every possible combination of characters from the previous line and the subsequent line (i.e., .+) and then picking the longest one. Including the line break explicitly gives it only one choice.
In Section
Seekers of Perl Wisdom
|
|