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

20 Replies, 1561 Views

Wow, thanks for all the replies, everyone! 🙌 I tried the `/<[^>]+>/g` pattern, and it’s working okay for now, but I see what you mean about edge cases. I’ll definitely check out BeautifulSoup and Cheerio—seems like they’re the way to go for anything more complex.

Quick follow-up: anyone have tips on handling malformed HTML with these tools? Like, what if the tags are broken or missing? Would love to hear your thoughts!

Thanks again, you all rock! 🚀

Messages In This Thread



Users browsing this thread: 1 Guest(s)