Pattern matching html tags

blidgiffivord

New Member
I'm new to pattern matching, having finally figured it out. I am stuck trying to find an approach to the following problem.I need to return a match (with php preg_match) if any of a number html tags are present.\[code\]<p></p><br><h1></h1><h2></h2>\[/code\]And return no match match otherwise. So anything not in the above list fails, e.g:\[code\]<script></script><table></table>\[/code\]ect...And ideally I want to operate a white list of safe tags if possible.Anyone know a pattern that I can use/adapt?
 
Back
Top