以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  求助正则表达式  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=190528)

--  作者:tianhao0817
--  发布时间:2024/2/20 12:24:00
--  求助正则表达式
判断字段串中是否包含   ‘ , " , < , > ,on*,script,iframe
的正规表达式应该怎么写,麻烦蓝老师帮忙写一下,谢谢

--  作者:有点蓝
--  发布时间:2024/2/20 13:38:00
--  
Dim s As String = "1sdgho scriptngfhfgh"
Dim p As String = "[\'""\\<\\>]|on|script|iframe"
Dim rgx = New System.Text.RegularExpressions.Regex(p, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
Output.Show(rgx.isMatch(s))

--  作者:tianhao0817
--  发布时间:2024/2/20 15:34:00
--  
谢谢蓝老师!