in reply to Re: regexp wizardry needed
in thread regexp wizardry needed
That's what you want?
DB<159> @date = (" PERIOD 13 OCT 06 OCT" =~ m/ PERIOD (\d\d) (\w\w\w +) (\d\d) (\w\w\w)/) => (13, "OCT", "06", "OCT")
If you only need the first letter of the month to be capitalized, try only matching the first letter and the rest, and process them accordingly with lc() or '\U' and '\L' in s///ubstitutions.
DB<164> ucfirst lc $date[1] => "Oct"
Cheers Rolf
|
|---|