Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'validate.asp?value=pipe pipe ---- or ------- validate.asp?value=àèìù+è MUST NOT BE VALID
- function ereg(strOriginalString, strPattern, varIgnoreCase)
- dim objRegExp : set objRegExp = new RegExp
- with objRegExp
- .Pattern = strPattern
- .IgnoreCase = varIgnoreCase
- .Global = True
- end with
- ereg = objRegExp.test(strOriginalString)
- set objRegExp = nothing
- end function
- if ereg(usern, "^[a-zA-Z0-9]+$", True) = True then
- response.write "No special characters allowed."
- else
- response.write "Valid."
- end if
Add Comment
Please, Sign In to add comment