Link to home
Start Free TrialLog in
Avatar of milani_lucie
milani_lucieFlag for United States of America

asked on

Need a regular expression for MM/DD/YYYY or M/DD/YYYY or MM/D/YYYY or M/D/YYYY ...

Hi,

Can you please provide me regular expression that accepts:

MM/DD/YYYY or M/DD/YYYY or MM/D/YYYY or M/D/YYYY

formats ?

Thanks

SOLUTION
Avatar of dzamfir
dzamfir
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kevin Cross
Something like this:
"^[0-1]?\\d/[0-3]?\\d/\\d{4}$"

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial