Best Way to Get All HTML Tags Regex? Need Help with a Reliable Pattern!

20 Replies, 1125 Views

Hey everyone!

So, I’ve been trying to *get all HTML tags regex* for a project, but man, it’s been a struggle. 😅 I’ve tried a few patterns, but they either miss some tags or grab too much junk.

Anyone got a reliable pattern to *get all HTML tags regex*? Like, something that works for most cases? I’m not looking for anything super fancy, just something that’ll catch `<div>`, `<p>`, `<a>`, etc., without breaking on weird edge cases.

Also, if you’ve got tips on handling nested tags or self-closing ones, that’d be awesome.

Thanks in advance! 🙏 (and sorry if this has been asked a million times lol)

Messages In This Thread
Best Way to Get All HTML Tags Regex? Need Help with a Reliable Pattern! - by - 27-09-2024, 12:38 PM



Users browsing this thread: 1 Guest(s)