I done it many times too. Thing is, regex is great to identify some parts and work on them. But not to interpret all the HTML, anyway, how many times you need that? In practice you only need to parse a few things, and when things get too complex, just explode() the content into smaller parts to work them separately and BAM now regular expressions are simpler and do what you want
View all comments
Show parent comment
13
u/hangfromthisone Sep 08 '17
I done it many times too. Thing is, regex is great to identify some parts and work on them. But not to interpret all the HTML, anyway, how many times you need that? In practice you only need to parse a few things, and when things get too complex, just explode() the content into smaller parts to work them separately and BAM now regular expressions are simpler and do what you want