Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Regex Extraction Help

by Flexx (Pilgrim)
on Aug 09, 2012 at 17:02 UTC ( #986558=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # assuming the raw data is in $line.
    $line =~ m/^[^;]*;\s*([^;]*?)\s*;/
    
    # $1 now holds whatever is between the second and third 
    # semicolon, leading and trailing spaces trimmed.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://986558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-10-02 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (56 votes), past polls