Regex for HTML is a nightmare, honestly. I’ve tried `/<[^>]+>/g`, and it’s okay for simple cases, but it’s not great for nested tags or self-closing ones.
If you’re serious about this, I’d recommend using a proper HTML parser. Regex just isn’t built for this kind of thing.
If you’re serious about this, I’d recommend using a proper HTML parser. Regex just isn’t built for this kind of thing.
