Regular Expressions 101

Library entries

date_regex

Vote

1

Regular Expression
python

"
(?<!\d) (?: [0-9]{4} (?P<sep1>[-/.])? (?: (?:(?(sep1)0?|0)[1-9]|1[0-2]) (?P=sep1) (?:(?(sep1)0?|0)[1-9]|1[0-9]|2[0-8]) |(?:(?(sep1)0?|0)[13-9]|1[0-2]) (?P=sep1) (?:29|30) |(?:(?(sep1)0?|0)[13578]|1[02]) (?P=sep1) (?:31) ) | (?: [0-9]{2} (?: 0[48] |[2468][048] |[13579][26] ) |(?: 0[48] |[2468][048] |[13579][26] )00 ) (?P<sep2>[-/.]?) (?(sep2)0?|0)2 (?P=sep2) (?:29) ) (?!\d)
"
gmx

Description

Loading markdown...
Submitted by anonymous - a year ago