Using PHP and preg_match_all I\'m trying to get all the HTML content between the following tags (and the tags also):
paragraph text don\'t
paragraph text
While doable with regular expressions, you could simplify the task by using one of the simpler HTML parser toolkits. For example with phpQuery or QueryPath it's as simple as:
qp($html)->find("p, ul, table")->text(); // or loop over them