Devtools.supstudio.in

Tools/Regex

HTML tag

What this is

You cannot parse HTML with regex. This pattern is for stripping simple tags from trusted snippets, not for sanitizing untrusted HTML (use a sanitizer).

/<\/?[A-Za-z][^>]*>/g
<div class="x">hi</div>
<!-- comments break naive patterns -->

Open in tester

FAQ

script tags?
A regex will miss javascript: and broken tags. Do not use this for XSS defense.

Related