私はこれらのメタ文字を拒否しようとしてきました ^ $ \ / ( ) | ? + * [ ] { } >< フォーム内のすべてのテキスト ボックスから。
これは私が持っているもので、キャラクターを拒否しません。textbox3 に入力されたものはすべて拒否されます。
Imports System.Text.RegularExpressions
Partial Class Default2
Inherits System.Web.UI.Page
Protected Sub company(source As Object, e As ServerValidateEventArgs)
If Not Regex.IsMatch(TextBox3.Text, Regex.Escape("^$\/()|?+[]{}><")) Then
e.IsValid = False
Else
e.IsValid = True
End If
End Sub
End Class
私を助けてください