find words in a given area in a string
<p>I have this in my string:</p>

<pre><code>....
&lt;ul id="dynamic"&gt;
    &lt;li&gt; Click &lt;a href="#"&gt;This&lt;/a&gt;!&lt;/li&gt;
    &lt;li&gt; &lt;a href="#"&gt;An Apple!&lt;/a&gt;&lt;/li&gt;
    //lots of lis
&lt;/ul&gt;
&lt;ul id="activities"&gt;
....so on and so on
</code></pre>

<p>I want to search and listed an array for the <code>li</code>s in the first <code>ul</code> called <code>dynamic</code>, I also need to separate the text in the <code>li</code> and the <code>a</code>s and also the urls. </p>
