Created
September 2, 2010 08:56
-
-
Save paulchubatyy/562072 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$re = array( | |
'/', | |
'.*?', # Non-greedy match on filler | |
'((?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|Tues|Thur|Thurs|Sun|Mon|Tue|Wed|Thu|Fri|Sat))', # Day Of Week 1 | |
'.*?', # Non-greedy match on filler | |
'((?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|Sept|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?))', # Month 1 | |
'.*?', # Non-greedy match on filler | |
'((?:(?:[0-2]?\\d{1})|(?:[3][0,1]{1})))(?![\\d])', # Day 1 | |
'.*?', # Non-greedy match on filler | |
'((?:(?:[1]{1}\\d{1}\\d{1}\\d{1})|(?:[2]{1}\\d{3})))(?![\\d])', # Year 1 | |
'/is', | |
); | |
$checkPattern = implode('', $re); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment