Objective C Regex Extract Data from Line Containing Text <p>I'm using objective c to create a program that will pull out data from a HTML file using regexes. The only lines that are important to the program contain the text <code>popupName</code> and I need to stip all HTML tags from it as well. Can this be done with one regex?</p> <p>So far I have been using <code>popupName</code> to find the line I am looking for and then deleting everything matching <code>&lt;[^&gt;]*&gt;</code>.</p> <p>Could these two operations be combined into one?</p> <p>Here's example input:</p> <pre><code> &lt;div&gt; &lt;div class="popupName"&gt; Bob Smith&lt;/div&gt; &lt;div class="popupTitle"&gt; &lt;i&gt;&lt;/i&gt; &lt;/div&gt; &lt;br /&gt; &lt;div class="popupTitle"&gt;&lt;/div&gt; &lt;div class="popupLink"&gt;&lt;a href="mailto:"&gt;&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>From that I would like to extract only "Bob Smith". Except, I would have multiple occurrences of the line names like that.</p>