Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Capturing all instances of a repeating sub-pattern in regex

by wanna_code_perl (Pilgrim)
on Nov 16, 2012 at 17:44 UTC ( #1004225=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        my @r; # Results, array refs for each row record
        $text = fetch_that_blob();
    ...
              (.+?)            (?:\s*\n)+
          (?: (\d+ (?:\sPSI)?) (?:\s*\n)+ ){4}
         /push @r, [ $1, $2, $3, $4, $5 ]/esgx;
    
  2. or download this
    Station 1
    50 PSI
    
    ...
    80
    
    96
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1004225]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-12-29 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls