nightkarnation
07-19-2012, 04:09 AM
Hey guys!
I have one missing part on my code...
Here it is:
var srch = "?Test_1234-";
var valid = /^[A-Za-z0-9_-]{9,25}$/;
if ( valid.test( srch ) )
{
//etc...
}
I need to validate srch if it contains only a-zA-Z0-9 _-?...min 9 and max 25 of length
The only problem I have is with the ? (question sign) character. I don't know how and where to place it in the valid variable...
Any ideas?
Thanks a lot in advance!!
I have one missing part on my code...
Here it is:
var srch = "?Test_1234-";
var valid = /^[A-Za-z0-9_-]{9,25}$/;
if ( valid.test( srch ) )
{
//etc...
}
I need to validate srch if it contains only a-zA-Z0-9 _-?...min 9 and max 25 of length
The only problem I have is with the ? (question sign) character. I don't know how and where to place it in the valid variable...
Any ideas?
Thanks a lot in advance!!