Regular Expression Validator with MultiLine TextBox

Joined
Jun 3, 2008
Messages
2
Reaction score
0
I have created a regular expression to validate dates in MM/DD/YYYY, MM/YYYY, and YYYY. "((0[1-9]|1[012])[/]((0[1-9]|[12][0-9]|3[01])[/])?)?(19|20)\d\d" . How can I make this expression work with a multi-line textbox, so that a user would be able to enter multiple dates (each on a new line) and still be validated by my expression.

Example: 3 dates entered into textbox, all be validated by expression.
Multi-Line TextBox:
01/01/2008
01/2007
2006
 
Joined
Jun 3, 2008
Messages
2
Reaction score
0
FYI, this is the answer
(((0[1-9]|1[012])[/]((0[1-9]|[12][0-9]|3[01])[/])?)?(19|20)\d\d(\s+)?)+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top