NerdsOfTech
asked on
PHP Sanitizing Date Inputs via REGEX for first instance of d/m/Y
Basically, I want to return the matching FIRST pattern of 1 or 2 digits (as the day), 1 or 2 (digits as the month), 4 digits as the year separated by forwarding slash characters '/' from a valid or malformed input.
given these hypothetical inputs:
01/01/2017
1/1/2017/01/03/2017
1/1/2017/01/03/2017/a/b/z/ 0000
a/1/2/b/c/9/1/g/8/99/1/34/ 9/99/2017/ z
ab/cd/efgh
I would like the output to be:
01/01/2017
1/1/2017
1/1/2017
9/99/2017
FALSE
given these hypothetical inputs:
01/01/2017
1/1/2017/01/03/2017
1/1/2017/01/03/2017/a/b/z/
a/1/2/b/c/9/1/g/8/99/1/34/
ab/cd/efgh
I would like the output to be:
01/01/2017
1/1/2017
1/1/2017
9/99/2017
FALSE
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER