Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Pattern matching with \t

by frankus (Priest)
on Dec 10, 2001 at 16:58 UTC ( #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.

¤


Comment on Re: Pattern matching with \t
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2014-10-20 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (92 votes), past polls