in reply to Script to validate date fails
The regular expression: (?-imsx:[1-31]-[1-12]-[1-99]) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- [1-31] any character of: '1' to '3', '1' ---------------------------------------------------------------------- - '-' ---------------------------------------------------------------------- [1-12] any character of: '1' to '1', '2' ---------------------------------------------------------------------- - '-' ---------------------------------------------------------------------- [1-99] any character of: '1' to '9', '9' ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
BTW, "validate valid date" has a nice ring to it :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Script to validate date fails
by madhum21 (Initiate) on Feb 17, 2012 at 13:10 UTC | |
|
Re^2: Script to validate date fails
by tobyink (Canon) on Feb 17, 2012 at 13:25 UTC |