in reply to Help with a more precise regex
And the output the script generates is:use strict; use Date::Manip; foreach (<DATA>) { chomp; next if /^$/; my @delta=split(/:/, ParseDateDelta($_)); my ($day) = $delta[3]; my ($hour) = $delta[4]; print "$_\t=>\tDay: $day\tHour: $hour\n"; } __DATA__ 3d 3d 2h 6h
3d => Day: 3 Hour: 0 3d 2h => Day: 3 Hour: 2 6h => Day: 0 Hour: 6
# Under Construction
|
---|
Replies are listed 'Best First'. | |
---|---|
Re:^2 Help with a more precise regex
by LogicalChaos (Beadle) on Apr 25, 2003 at 20:57 UTC | |
by vladb (Vicar) on Apr 25, 2003 at 21:16 UTC | |
by LogicalChaos (Beadle) on Apr 25, 2003 at 22:42 UTC |