Hello monks,
My regular expression for time-of-day is not working as expected.
Regular expression below is matching "99:02 pm" which is incorrect. What went wrong?
@a = ("9:17 am", "12:30 pm", "99:02 pm", "99:99 pm"); foreach $i (@a) { print "$i\n" if($i =~ /(1[012]|[1-9]):([0-5][0-9]).([aApP][mM])/); }
In reply to regular expression for "time-of-day" is not working by vjvalor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |