Hi, I am trying to be helpful, not just argumentative just for the sake of arguing. I looked at this:
http://search.cpan.org/~rcaputo/POE-1.003/lib/POE/Wheel/FollowTail.pm#Filter

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.


In reply to Re^5: regex: extract multiple number of date patterns from certain lines by Marshall
in thread regex: extract multiple number of date patterns from certain lines by Random_Walk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.