Skip to content Skip to sidebar Skip to footer

How Do I Extract Html Content Using Regex In Php

I know, i know... regex is not the best way to extract HTML text. But I need to extract article text from a lot of pages, I can store regexes in the database for each website. I'm

Solution 1:

You are matching for class="body" your document has class=body: you're missing the quotes. Use "/<div class=\"?body\"?>(.*?)<\/div>/sui".


Post a Comment for "How Do I Extract Html Content Using Regex In Php"