Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Regex Extraction Help

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

Help for this page

Select Code to Download


  1. or download this
    $record = 'A;B;C;D';
    
  2. or download this
    $second_field = (split ';', $record)[1];
    
  3. or download this
    A;B
    #foo;B;ar
    ;B
    
  4. or download this
    if($record =~ m/^.;(.);.;.$/) {
      $second_field = $1;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://986559]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-07-23 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (347 votes). Check out past polls.