in reply to Regular expression for date
Because of your missing code tags, I can't really tell, but it seems your loop runs WHILE the re matches and not UNTIL it matches.
and you don't anchor (/^…$/) your RE so "this 123401-01-0123456 is not a date" as input will also match.
|
|---|