Tutorial
Tools & Languages
Examples
Reference
Matching a Date in yyyy-mm-dd Format
^
(
19
|
20
)
\d
\d
[- /.]
(
0
[1-9]
|
1
[012]
)
[- /.]
(
0
[1-9]
|
[12]
[0-9]
|
3
[01]
)
$
Assert position at the beginning of the string
Match the regular expression below and capture its match into backreference number 1
Match either the regular expression below (attempting the next alternative only if this one fails)
Match the characters "19" literally
Or match regular expression number 2 below (the entire group fails if this one fails to match)
Match the characters "20" literally
Match a single digit 0..9
Match a single digit 0..9
Match a single character present in the list "- /."
Match the regular expression below and capture its match into backreference number 2
Match either the regular expression below (attempting the next alternative only if this one fails)
Match the character "0" literally
Match a single character in the range between "1" and "9"
Or match regular expression number 2 below (the entire group fails if this one fails to match)
Match the character "1" literally
Match a single character present in the list "012"
Match a single character present in the list "- /."
Match the regular expression below and capture its match into backreference number 3
Match either the regular expression below (attempting the next alternative only if this one fails)
Match the character "0" literally
Match a single character in the range between "1" and "9"
Or match regular expression number 2 below (attempting the next alternative only if this one fails)
Match a single character present in the list "12"
Match a single character in the range between "0" and "9"
Or match regular expression number 3 below (the entire group fails if this one fails to match)
Match the character "3" literally
Match a single character present in the list "01"
Assert position at the end of the string (or before the line break at the end of the string, if any)
Welcome
Tutorial
Tools and Languages
Examples
Reference
About This Site
Download and Print