|
-
May 15th, 2008, 09:13 AM
#1
Thread Starter
Member
[RESOLVED] [2005] RegEx help - One more time!
OK, with much help from this forum, reading online and tweaking I have been trying to build a regex to capture dates within broader strings. The following:
((0?[1-9]|1[0-2])(/|-)(0?[1-9]|[1-2][0-9]|3[0-1])(/|-)(19|20)?[0-9][0-9])|((JANUARY|FEBRUARY|MARCH|APRIL|MAY|JUNE|JULY|AUGUST|SEPTEMBER|OCTOBER|NOVEMBER|DECEMBER) +([1-2][0-9]|3[0-1]|0?[1-9]),? +(19|20)?[0-9][0-9])
works for d/m/yy(yy), d-m-yy(yy), and MONTH d(,) yy(yy)
I have tried to add one more grouping to capture:
day Month Year (e.g., 10 FEBRUARY 2002)
but have failed. Any help would be greatly appreaciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|