Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Regular expression for date

by perlee (Initiate)
on Aug 25, 2008 at 07:47 UTC ( [id://706645]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    do {
        print "Enter Date. For Ex: 10-01-08 \n";
        chomp($date = <STDIN>);
    } while ($date =~ /0[1-9]|1[0-2]-0[1-9]|1[0-9]|2[0-9]|3[0-1]-0[8-9]|1[
    +0-9]/);
    
  2. or download this
    #while ($date !~ /(\d\d)[-](\d\d)[-](\d\d)/);
    

Log In?
Username:
Password:

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

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

    No recent polls found