[Javascript] Problem with Regular Expression
Hi all,
First of all I must say that I am a newbie when it comes to javascript language.
Here is my problem.
I need validate in `myForm` this string:
And try this Regular Expression:
But the correct string:
is not validate. Why?
I need also optional add this other string:
when the string part `/test` is not required.
Can you explain any one or any sample code related this...
Your help would be very appreciated.
thanks for your time and hints.
Thanks in advance.
Cheers
Hi all,
First of all I must say that I am a newbie when it comes to javascript language.
Here is my problem.
I need validate in `myForm` this string:
Code:
09 - AB800
Code:
if (!myForm.Folder.value.match("/^0[0-9] \- [a-z0-9]{5,20}$/i", "")) { window.alert('Not valid.'); myForm.Folder.focus(); myForm.Folder.select(); return false; }
Code:
09 - AB800
I need also optional add this other string:
Code:
09 - AB800/test
Can you explain any one or any sample code related this...
Your help would be very appreciated.
thanks for your time and hints.
Thanks in advance.
Cheers
Comment