title: Regular expression to capture selected value in the drop down list
body: <p>I want to create a regex which gives result for the selected field in a drop down list for a particular id.</p>
  
  <p>For example: if I pass <strong>id="countries"</strong> the result should be <strong>India</strong> (since India is selected) or <strong>id="Gender"</strong> the result should be <strong>Male</strong>.</p>
  
  <pre><code>&lt;select id='countries'&gt;
      &lt;optionvalue='0'&gt;All Categories&lt;/option&gt;
      &lt;option value='1'&gt;USA&lt;/option&gt;
      &lt;option value='2'&gt;China&lt;/option&gt;
      &lt;option selected='selected' value='3'&gt;India&lt;/option&gt;
      &lt;option value='4'&gt;Japan&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select id='Gender'&gt;
      &lt;option value='0'&gt;All Categories&lt;/option&gt;
      &lt;option selected='selected' value='1'&gt;Male&lt;/option&gt;
      &lt;option value='2'&gt;Female&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p><strong>Note: Consider above HTML as a plane text.</strong></p>