Regular Expression Help

Soldato
Joined
26 Aug 2005
Posts
6,901
Location
London
How can I evaluate in a text field if someone types in DD/MM/YYYY OR a string?

I've got the following expression for the date:

^(0?[1-9]|[12][0-9]|3[01])[ \/.-](0?[1-9]|1[012])[ \/.-](19|20)\d\d$

How can I change it to also include a particular string value (say test)?
 
How can I evaluate in a text field if someone types in DD/MM/YYYY OR a string?

I've got the following expression for the date:

^(0?[1-9]|[12][0-9]|3[01])[ \/.-](0?[1-9]|1[012])[ \/.-](19|20)\d\d$

How can I change it to also include a particular string value (say test)?

Can you explain that a bit better I'm struggling to understand what you mean?
 
Back
Top Bottom