MayoorPatel
asked on
Function in Classic ASP to Remove Invalid Characters
HI there I have a questionaire which is comprised of 5 text fields and 1 texarea form field. I would like a function to strip out all invalid characters from each of these strings before I submit them to my stored procedure. Does anyone have a fuction that does this?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ta very much!
ASKER
Dim regExp
Set regExp = new regexp
regExp.Pattern = "[^A-Z^a-z^0-9\s]" 'any character that is not 0 to 9
regExp.Global = True 'search the entire string
Can someone who knows about reg expressions tell me if this takes care of all invalid characters?