Loading ...
Sorry, an error occurred while loading the content.

RE: [PBML] Setting special variable $/ to a regular expression

Expand Messages
  • Madani, Srikanth, VF-DE
    ... Well, man perlvar says: perlvar Remember: the value of $/ is a string, not a regexp. perlvar AWK has to be better for something :-) ... I m not sure I
    Message 1 of 1 , Aug 26 7:03 AM
    • 0 Attachment
      Our fellow list member Denham wrote:
      >Is there some way to set the special variable $/ to a regular expression
      >such as (.+?):(\d+):(.*)

      Well, man perlvar says:

      perlvar> Remember: the value of $/ is a string, not a regexp.
      perlvar> AWK has to be better for something :-)


      >I am trying to process a logfile, with a time based entry as an entry
      >identifier i.e.
      >Wed Mar 31 11:40:45 2004
      >Thread 1 advanced to log sequence 4636


      I'm not sure I understand the parsing requrement correctly, but perhaps you can just read each line and search for the timestamp pattern?

      Cheers,

      Srikanth Madani
      A bird in the hand makes it awfully hard to blow your nose.
    Your message has been successfully submitted and would be delivered to recipients shortly.