Response.Write("Hello, " & RemoveBadCharacters(Request.Form("UserName")))
Response.Write("<BR>This is why you received an error:")
Function RemoveBadCharacters(strTemp)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = "[^A-Za-z0-9_ ]"
regEx.Global = True
RemoveBadCharacters = regEx.Replace(strTemp, "")
End Function
(http://msdn.microsoft.com/en-us/library/ms526004%28v=VS.90%29.aspx)
Không có nhận xét nào:
Đăng nhận xét