![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Posts: 66
Rep Power: 0
![]() |
Regular Exp help
Yo all! ^_^
I'm trying to make a reg exp that will match a users inputed time. I want the RE to match a string like 8:00am or 12:00pm. My version of the RE is as follows: var regEx = new RegExp ("(1-12):(0)*(0-60)(am|pm)")But...of course...it dosen't work. It ALWAYS returns false. (I'm not great with RE... ) Can I get some help? And just to point out, I want the test to fail if it is not in the form (x)x:xx(am|pm). Thanks a lot! ^_^ |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|