如何查找String是否包含html数据? [英] How to find if String contains html data?
本文介绍了如何查找String是否包含html数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何查找字符串是否包含HTML数据?用户通过网页界面提供输入,很可能他可以使用简单的文本或使用HTML格式。
可以使用正则表达式来搜索HTML标签。
How do I find if a string contains HTML data or not? The user provides input via web interface and it's quite possible he could have used either a simple text or used HTML formatting.
解决方案
You can use regular expressions to search for HTML tags.
这篇关于如何查找String是否包含html数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文