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

Re: $_ ('x' regex modifier)

by Russ (Deacon)
on Jun 22, 2000 at 01:18 UTC ( [id://19348]=note: print w/replies, xml ) Need Help??


in reply to $_

While on the discussion of code tags, let me mention the x regexp modifier. It lets you use whitespace
in your regular expressions for greater readability.
m/[0-3]? [0-9(th)?(st)?(nd)?(rd)?] \s+ (Jan(uary)?| Feb(ruary)?| Mar(ch)?| Apr(il)?| May| Jun(e)?| Jul(y)?| Aug(ust)?| Sep(tember)?| Oct(ober)?| Nov(ember)?| Dec(ember)?) \s+ [0-9]?[0-9]?[0-9][0-9]/igx;
The extra whitespace makes it far easier to follow (and doesn't make the browser screen width 4000 pixels wide. ;-)

Russ

Log In?
Username:
Password:

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

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

    No recent polls found