开发者

asp.net regular expression

I created a asp.net page. The rich text area and regular expression validator are existed in this page. I want to check the html span tag that is contained or not in the rich text area. And then, I开发者_运维百科 don't know how to write expression in regular expression validator. Please, help me.


You can figure out if there's a span tag with C# in ASP.NET with the following regex:

bool existsSpan = Regex.IsMatch(areaText, "<span[^>]*>");

It searches for <span then none or some chars that is not >, and finally a >.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜