Home >Backend Development >PHP Tutorial > 请问一个正则(急)

请问一个正则(急)

WBOY
WBOYOriginal
2016-06-13 13:36:55926browse

请教一个正则(急)
验证一串文本中是否有HTML标签 (如一般的HTML标签
..经常会用的)

------解决方案--------------------
book怎么有带有两个,没搞错吧?

PHP code
if(strip_tags($string,'<sex><book>') !== $string)
{
  echo "有html标签";
} <div class="clear">
                 
              
              
        
            </div></book></sex>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn