Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Regular expression help

by QM (Parson)
on Aug 17, 2005 at 21:40 UTC ( [id://484612]=note: print w/replies, xml ) Need Help??


in reply to Regular expression help

First, be careful about "odd" names, such as "Jean-Michel Paris" and "Mary de Konig".

I often do quick and dirty parsing jobs like this:

my $name = qr/([\w_-=]+)\s*/; my $enum = qr/(([\d.-+,])\s*/; <p> while ( <> ) { if ( my @captures = /$name$name$enum/ ) { do_something_here(@captures); } }

-QM
--
Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-18 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found