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

Re: Pattern matching with \t

by frankus (Priest)
on Dec 10, 2001 at 16:58 UTC ( [id://130647]=note: print w/replies, xml ) Need Help??


in reply to Pattern matching with \t

Not tested this but:
  • Used i to indicate case insensitivity.
  • AFAIK special chars don't need \ in character classes.
  • Used x to allow for new lines in regex to aid readability.
  • Used ? in .+ match to make it parsimonius.
  • Used \d instead of 0-9, it means the same thing.

$_[0] =~ m/([A-Z\d_/.,-]+) \s*\t* (.+?) \s*\t* ([\d.]+) \t* ([\d.]+)*/ix;

--

Brother Frankus.

¤

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-03-28 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found