Re: Regular Expression help!
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 16:07:16 +0100
Suk wrote:
Look at the excerpt from a CSV file below
"C29560","Some text ","07/12/2006 11:00:00","07/12/2006
16:00:00","07/12/2006 16:00:00","07/12/2006 11:00:00","NODE21A3"
I am trying to write a snippet of perl that will swap the date and
year bits in all of the date fields, so that 07/12/2006 becomes
2006/12/07. So the line should read:
"C29560","Some text ","2006/12/07 11:00:00","2006/12/07
16:00:00","2006/12/07 16:00:00","2006/12/07 11:00:00","NODE21A3"
Any help would be appreciated !
What have you tried so far?
Where does your code not meet your expectations?
Using Text::CSV_XS, split and join this is a trivial exercise.
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
.
- Follow-Ups:
- Re: Regular Expression help!
- From: Suk
- Re: Regular Expression help!
- References:
- Regular Expression help!
- From: Suk
- Regular Expression help!
- Prev by Date: Regular Expression help!
- Next by Date: Re: sort an array unique.
- Previous by thread: Regular Expression help!
- Next by thread: Re: Regular Expression help!
- Index(es):
Relevant Pages
|