Hi,
Wanted some help with inserting values in a text box with javascript validation wherein it should insert letters, numbers and certain special characters like
(\ -) only.
What I used to do is var re = /^[a-zA-Z0-9]+$/; for the text box
which inserts letters and numbers.
and thought var re = /^[a-zA-Z\0-9-].+$/;would work but instead
it takes all special characters.Also tried using
var re = /^[a-zA-Z\0-9-].+$/; and var re = /^[a-z,A-Z,0-9,\-,\\\\]*$/; these two exp inserts alphanumeric and - characters but does not insert \. \ is a metacharacters itself hence also have tried using \\ but even this does not work. In exps var re = /^[a-zA-Z\0-9-].+$/; or var re = /^[a-z,A-Z,0-9,\-,\\\\]*$/; I just want is an added \ along with alphanumerics chars and -.
Thank You.