Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: simple regexp question

by osunderdog (Deacon)
on Feb 10, 2006 at 13:05 UTC ( #529348=note: print w/replies, xml ) Need Help??


in reply to simple regexp question

Use ? To indicate a character that can appear zero or one time.

For example:

$ perl -e "print '2000-20-30' =~ /\d{4}-?\d{2}-?\d{2}/" 1 $ perl -e "print '20002030' =~ /\d{4}-?\d{2}-?\d{2}/" 1

Hazah! I'm Employed!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2020-12-01 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?