JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 2nd, 2003, 11:58 PM
Marco Marco is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 1 Marco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
help me comlete such a Regular Expression


I need the kind of Regular Expression about time;
I only can put in like "12/03" or "12-03" or "12/03 13:52" or "12-03 13:52" or "2003/12/03 13:52" or "2003-12-03 13:52"
Help me! please....

Reply With Quote
  #2  
Old August 5th, 2006, 08:23 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 472 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 14 m 46 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
if this is still a prob, what formation would you like to put the date into????
if not and you see this post please reply.

colton22

Reply With Quote
  #3  
Old August 6th, 2006, 02:44 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information. Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 992 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 742073 Folding Title: Super Ultimate Folder - Level 2Folding Points: 742073 Folding Title: Super Ultimate Folder - Level 2Folding Points: 742073 Folding Title: Super Ultimate Folder - Level 2Folding Points: 742073 Folding Title: Super Ultimate Folder - Level 2Folding Points: 742073 Folding Title: Super Ultimate Folder - Level 2Folding Points: 742073 Folding Title: Super Ultimate Folder - Level 2Folding Points: 742073 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 13 h 37 m 16 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
I think this should do the trick:
RegExp Code:
Original - RegExp Code
    ^([0-9]{4}[-/])?[0-9]{2}[-/][0-9]{2}( [0-9]{2}:[0-9]{2})?$


One caveat though: This will also match "2003/12-03 13:52" or "2003-12/03 13:52".
To filter those out, the expression would have to be much longer.
__________________
This is my code. Is it not nifty?

"The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools."
---Douglas Adams


Join the Itsacon fanclub!    
Zero Tolerance: Spammers banned so far: 275

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > help me comlete such a Regular Expression


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway