n4mi
n4mi

Reputation: 21

js regexp for particular date format

i just want to have a regexp for this string mm/dd/yyyy. Ex is 06/25/2016. Thanks for the help in advance.

Upvotes: 0

Views: 41

Answers (2)

Take_Care_
Take_Care_

Reputation: 2144

THis should help

[0-1][0-9]\/[0-3][0-9]\/[0-2][0-9]{3}

Upvotes: 1

NtFreX
NtFreX

Reputation: 11357

^[0-1][0-9]\/[0-3][0-9]\/[0-9]{4,4}$

Regex101 is a good site to test your regex

Upvotes: 1

Related Questions