I just ran across this in the VB help. Sounds perfect. Only they don't
tell me what namespace must be imported to use regex. I guess that's
the problem cause I pasted this into a test program and it tell me Regex
is not declared.
Function CleanInput(ByVa l strIn As String) As String
' Replace invalid characters with empty strings.
Return Regex.Replace(s trIn, "[^\w\.@-]", "")
End Function
tell me what namespace must be imported to use regex. I guess that's
the problem cause I pasted this into a test program and it tell me Regex
is not declared.
Function CleanInput(ByVa l strIn As String) As String
' Replace invalid characters with empty strings.
Return Regex.Replace(s trIn, "[^\w\.@-]", "")
End Function
Comment