HI,
how can i write regular expression for time in 24-hour format i:e, HH:MM:SS.
using preg_match.
thanks
babu
-
How much free photo storage do you get? Store your holiday snaps for FREE with
Yahoo! Photos. Get Yahoo! Photos
Hello babu,
Monday, August 29, 2005, 6:50:32 AM, you wrote:
how can i write regular expression for time in 24-hour format i:e,
HH:MM:SS. using preg_match.
?php
$xtime=19:59:53;
if (preg_match(/([01][0-9]|[2][0-3]):[0-5][0-9]:[0-5][0-9]/, $xtime))
echo Good;
else
echo Bad;
?
--
2 matches
Mail list logo