没有很多陈述的正则表达式 [英] there no regular expression for many statement

查看:74
本文介绍了没有很多陈述的正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
没有用于解析许多语句的正则表达式
如果作为
< B>单词</B> dsdd< BR/>

< B> dd< B> I< I> Anytown</I> ds< U> sd</U>

< B> U< dsds</U</B>

如果用户输入标签但未关闭此标签,则会出现错误

感谢您的帮助.

hi every one
there no regular expression for parse many statement
if as
<B> word </B> dsdd<BR/>

<B>dd</B>dd <I>Anytown</I> ds <U>sd</U>

<B><U>dsds</U></B>

and if user enter tag without close this tag give error

thanks for any help

推荐答案

不,在处理错误输入时,正则表达式不好.在这种情况下,使用容错HTML解析器可能会更好.这里有一个: HTML敏捷包 [
No, regular expressions are not good when handling bad inputs. In this case, you would probably be much better off using an fault tolerant HTML parser. There is one here: HTML Agility pack[^]


这篇关于没有很多陈述的正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆