Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: need regular expression

by saintmike (Vicar)
on Nov 02, 2005 at 07:37 UTC ( #504851=note: print w/replies, xml ) Need Help??


in reply to need regular expression

for(qw(4-10-31 14-11-31)) { /(\d+)(-.*)/ && printf "%d%s\n", 2000+$1, $2; }
Note that this obviously doesn't work for pre-2000 dates like 94-10-31.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2019-11-11 23:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (64 votes). Check out past polls.

    Notices?