I'm trying to use regex to filter forbidden HTML tags out of a given string. Yes I know, I'm supposed to use a parser instead but for this specific problem it's faster this way.
The idea is to whitelist every tag which is okay (e.g.
<span>, <b>, </br>
This regex will get tags while ignoring the span, br, b opening and closing tags.
It should even ignore those from the white list if they contain attributes.