So far this captures everything i need ending with 'em' i need regex to capture paragraphs ending in 'ppp' also.
My regex:
%<h2>Storyline</h2>(.*)em%s So far this captures everything i need ending with 'em' i need regex to capture paragraphs ending in 'ppp' also.
My regex:
%<h2>Storyline</h2>(.*)em%s I would advise not to parse HTML with regex, but this seems easy enough seeing as you aren't actually parsing it as HTML...
%<h2>Storyline</h2>(.*?)(?:em|ppp)%s DOMDocument, which will handle all the parsing of the markup for you so you can focus on getting the information from the markup.