title: If, then, else regex - How to write the Condition
body: <p>Trying to capture name= and value= US or NONE (if selected="selected" not included). Given the following (part of a larger $page):</p>
  
  <pre><code>$page = '
  &lt;select name="country" &gt;&lt;option value="NONE"&gt;Select One&lt;/option&gt;    
  &lt;option value="AE"&gt;UNITED ARAB EMIRATES&lt;/option&gt;
  &lt;option value="GB"&gt;UNITED KINGDOM&lt;/option&gt;
  &lt;option value="US" selected="selected"&gt;UNITED STATES&lt;/option&gt;
  &lt;option value="UY"&gt;URUGUAY&lt;/option&gt;
  &lt;option value="UZ"&gt;UZBEKISTAN&lt;/option&gt;
  &lt;option value="ZW"&gt;ZIMBABWE&lt;/option&gt;&lt;/select&gt;';
  </code></pre>
  
  <p>Edit 1 This pattern won't pick up NONE if none of the options are selected.</p>
  
  <pre><code>$pattern = '/select name="([a-zA-Z]*)"\s?&gt;[\w\W]*value="([A-Z]{2,4})"(selected="selected"&gt;)?/'
  </code></pre>
  
  <p>So, I'm looking for a pattern that will.</p>