Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Dec 7th, 2005, 2:11 PM   #1
MegaArcon
Programmer
 
MegaArcon's Avatar
 
Join Date: Aug 2005
Posts: 66
Rep Power: 0 MegaArcon is an unknown quantity at this point
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! ^_^
MegaArcon is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:21 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC