Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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.

¤

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 cooling their heels in the Monastery: (7)
As of 2016-10-01 17:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (3 votes). Check out past polls.