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

Re^3: need regular expression

by Perl Mouse (Chaplain)
on Nov 02, 2005 at 11:13 UTC ( [id://504898]=note: print w/replies, xml ) Need Help??


in reply to Re^2: need regular expression
in thread need regular expression

I prefer to use strings - in that case, it becomes easy to deal with 3 or 4 digit years as well:
my @dates = qw /4-10-31 14-11-31 1979-10-10/; for (@dates) { s/(\d+)/substr("2000", 0, -length($1)).$1/e; print "$_\n"; } __END__ 2004-10-31 2014-11-31 1979-10-10
Perl --((8:>*

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-26 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found