Title |
Test
Find
Pattern Title
|
Expression |
^(?<From>(JANUARY|FEBRUARY|MARCH|APRIL|MAY|JUNE|JULY|AUGUST|SEPTEMBER|OCTOBER|NOVEMBER|DECEMBER|[ ]|,|/|[0-9])+)(-|–|:|TO)?(?<To>(JANUARY|FEBRUARY|MARCH|APRIL|MAY|JUNE|JULY|AUGUST|SEPTEMBER|OCTOBER|NOVEMBER|DECEMBER|[ ]|,|/|[0-9]|PRESENT)+)+(:)* |
Description |
This regular expression will match date given in any format expcept (mmm). Its speciality is that it divides dates into <from> part and <to> part. Use Groups to access these parts.
e.g. JANUARY 1998 TO JUNE 2000
<From>="JANUARY 1998"
<to>="JUNE 2000"
|
Matches |
JANUARY 2000 | 19-01-2000 | 12/11/2000 |
Non-Matches |
"Hello it is ordinary text" | "non -date text" |
Author |
Rating:
Not yet rated.
Manpreet Grewal
|
Source |
|
Your Rating |
|
Title: hrnm..
Name: could be better
Date: 12/18/2008 8:25:39 AM
Comment:
"1/dsf dsfsd" also works... seems as long is it starts with "1/" it'll match.
Title: 1/a/a
Name: r
Date: 1/19/2004 4:04:29 PM
Comment:
1/a/a works?
Title: rate
Name: suchitra
Date: 12/2/2003 7:57:50 AM
Comment:
it works..good!