G
Guest
Hello:
I have a string, "Testing_!@#$%^&*()". It may have single and double
quotations as well.
I would like to strip all chararcters others than a-z, A-Z, 0-9 and the comma.
I came across the following snippet in the online help but the output does
not change at all:
Function CleanInput(ByRef strIn As String) As String
'returns a string after stripping out all nonalphanumeric characters
except @, - (a dash), and . (a period).
' Replace invalid characters with empty strings.
Return Regex.Replace(strIn, "[^\w\.@-]", "")
End Function
So if I pass in a string, "Testing_!@#$%^&*()", I get the same back.
Any help will be appreciated.
Thanks.
Venki
I have a string, "Testing_!@#$%^&*()". It may have single and double
quotations as well.
I would like to strip all chararcters others than a-z, A-Z, 0-9 and the comma.
I came across the following snippet in the online help but the output does
not change at all:
Function CleanInput(ByRef strIn As String) As String
'returns a string after stripping out all nonalphanumeric characters
except @, - (a dash), and . (a period).
' Replace invalid characters with empty strings.
Return Regex.Replace(strIn, "[^\w\.@-]", "")
End Function
So if I pass in a string, "Testing_!@#$%^&*()", I get the same back.
Any help will be appreciated.
Thanks.
Venki