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

Re: [PBML] Help with RE

Expand Messages
  • merlyn@stonehenge.com
    ... portos 09/02/05 08:18:14.394 1396 [4] NON_REG_MSG_RECUS [Message reçu : Fri portos Sep 02 10:16:54 CEST 2005 ] [3121 D: ATELIER CURRENT_release SOURCE]
    Message 1 of 4 , Sep 2, 2005
    • 0 Attachment
      >>>>> "portos" == portos latinos <portos_latinos@...> writes:

      portos> 09/02/05 08:18:14.394 1396 [4] NON_REG_MSG_RECUS [Message reçu : "Fri
      portos> Sep 02 10:16:54 CEST 2005"] [3121 D:\ATELIER\CURRENT_release\SOURCE]


      portos> 9/02/05 08:18:15.910 928 [4]
      portos> I want to catch if a line have NON_REG_MSG_RECUS Fri Sep 02
      portos> 10:16:54 CEST 2005 for exemple on it.

      portos> VARIABLE STRING=Fri Sep 02 10:16:54 CEST 2005 in this case.

      So you want any text between quotes following your target string?

      That'd look like this:

      while (<>) {
      if (/NON_REG_MSG_RECUS.*?"(.*?)"/) {
      print "found $1";
      }
      }

      [Aside, to the rest of the mailing list... NOTE that this wasn't
      a FAQ... and I was willing to ask questions, and answer them. *this*
      is the way this mailing list works. Not people asking FAQs.]

      --
      Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
      <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
      Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
      See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
    Your message has been successfully submitted and would be delivered to recipients shortly.