I am trying to get the text in between the <ul> and <ul> tags to match. In the example in my code, it should match <li>AAAAA. But it is not working. How can I fix this?
<?php
$data='
<ul>
<li>AAAAAA
<ul>
<li>BBBBB</li>
</ul>
</li>
</ul>';
$regex = '/\<ul\>(.*)\<ul\>/i';
preg_match($regex,$data,$match);
echo $match[1];
var_dump($match);
?>