in reply to Re^4: regex: extract multiple number of date patterns from certain lines
in thread regex: extract multiple number of date patterns from certain lines
I have no experience at all with this module. But it looks like you can call a sub when a new line appears and that sub can do what it wants with that line. Maybe my impression is wrong somehow..That's always possible!.
I do have some experience with regex (and I'm not a regex guru by any means!). But my experience with this is that 2 regex's that don't backtrack, don't use fancy look forward features, will run faster than a single fancy regex. There are also differences between say Perl 5.6 and Perl 5.10 regex engines! Perl 5.10 is much faster if that matters to you or you can take advantage of that.
Your problem: date1 garbage qualifying_text date2,date3,date4... fits very nicely into the algorithm of skip the lines that don't have the qualifying_text and use match global for the dates on the lines that do have the qualifying_text.
|
|---|