<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中文網其他相關文章!