Hi everyone I am having and issue using Regex and can not get it to work when there are spaces or line breaks in the content.
$content = "<dt><span>Name:</span></dt>
<dd>
John
</dd>
<dt><span>Age:</span></dt>
<dd>
40
</dd>
<dt><span>Sex:</span></dt>
<dd>
Male
</dd>";
The regex i am using is
preg_match_all('/<dt><span>(.*)<\/span><\/dt><dd>(.*)<\/dd>/',$content, $output);