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

Re: [PBML] Help creating correct regular expression

Expand Messages
  • gordon stewart
    ... means the following are valid: PERL020103 PERL020554 PERL020554 |PERL020554 PERL020554 | PERL020554 PERL020554 - PERL020554 PERL020554,PERL020554 020554
    Message 1 of 3 , Jan 6, 2004
    • 0 Attachment
      --- "Fortuno, Adam" <fortunoa@...> wrote:

      ---------------------------------
      means the following are valid:

      PERL020103 PERL020554
      PERL020554 |PERL020554
      PERL020554 | PERL020554
      PERL020554 - PERL020554
      PERL020554,PERL020554
      020554 020554

      My brain is fried. Here is what I've tried. I welcome
      any suggestions.

      <

      Try putting it in an array...

      foreach $line (@aray){
      $line =~ m/(\d+) .*(\d+)/);
      print "$1 $2";
      }

      You can then store the numbers anyway you want - into
      other variables

      G
      (untested - but should work)


      =====
      G-Man
      One OS to fool them all, One browser to find them.
      One email client to gather them in, and through the security holes, worm them.
      gordonstewart5@... for personal replies please.

      __________________________________
      Do you Yahoo!?
      Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
      http://hotjobs.sweepstakes.yahoo.com/signingbonus
    Your message has been successfully submitted and would be delivered to recipients shortly.