Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: String manipulation

by LanX (Cardinal)
on Dec 15, 2012 at 13:54 UTC ( #1008984=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<101> s/(\d)\w\w /$1 / for @a=("December 14th 2012", "December 21s
    +t 2012" , "December 22nd 2012")
     => ""
     
      DB<102> @a
     => ("December 14 2012", "December 21 2012", "December 22 2012")
    
  2. or download this
      DB<126> map {/^(\w+ \d\d?)\w\w( \d\d\d\d)$/; "$1$2"} "December 1th 2
    +012", "December 21st 2012" , "December 22nd 2012"
     => ("December 1 2012", "December 21 2012", "December 22 2012")
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2021-04-13 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?