<p>
$text = '<p>
/ # Start Pattern < # Match '<' at beginning of tags ( # Start Capture Group - Tag Name [a-z] # Match 'a' through 'z' [a-z0-9]* # Match 'a' through 'z' or '0' through '9' zero or more times ) # End Capture Group [^>]*? # Match anything other than '>', Zero or More times, not-greedy (wont eat the /) (\/?) # Capture Group - '/' if it is there > # Match '>' /is # End Pattern - Case Insensitive & Multi-line ability
<p> hello
以上是如何使用正则表达式高效去除HTML标签的属性?的详细内容。更多信息请关注PHP中文网其他相关文章!