-
like [a-z]
hi there,i need to write a function that alert me if the textfield value is not between [a-z] and [1-9] and other charchters like underscor "_",
i know there is a "LIKE" function in Vb,but when it comes to Jscript,i'm just a beginner,thank you for your time.
-
Well, I don't do anything with JScript, so I wouldn't know...
But in JavaScript...
Code:
if (testString.search(/\W/) != -1) {
// String is good, contains only a-zA-Z0-9_
}
else {
// String is bad, warn user
}
Ofcourse, TIAMTOW, and I haven't even tested this code.
-
I found a sweet script to do this somewhere. I think she's on my home machine though, so I'll send it later if I remember.
Someone post here to remind me, and I'll see the reminder when I check my email at home later...
:)