To be on the safe side it's probably best to allow whitespaces (or none) in some more places which would turn the regex into: $time =~ /^\s*(\d{1,2})\s*:\s*(\d\d)\s*([APM]{2})\s*$/The \s* matches zero or more whitespaces and as many as possible (greedy). So this allows for any of the following (_ equals whitespace):
And then you could allow for leaving out of AM/PM and assuming a 24 hour clock .... but /me gets carried away ;)_12:00_AM__ 1_:_00_PM 2:20AM
-- Hofmator
In reply to Re: Re: Re: Sorting Issues :(
by Hofmator
in thread Sorting Issues :(
by LostS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |