Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Parsing/regex help required

by Anonymous Monk
on Sep 27, 2021 at 13:49 UTC ( [id://11137039]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $entry = "123. The Quick brown fox – jumped over";
    my( $num, $text1, $text2 )= $entry =~ m{^ (\d+) \. \s+ (.*?) \s+-\s+ (
    +.*?) $}x;
    say "$num|$text1|$text2";
    
  2. or download this
    Use of uninitialized value $num in concatenation (.) or string at ./te
    +st.pl line 10.
    Use of uninitialized value $text1 in concatenation (.) or string at ./
    +test.pl line 10.
    Use of uninitialized value $text2 in concatenation (.) or string at ./
    +test.pl line 10.
    ||
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-03-28 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found