title: regex matching an open and close tag and a certain text patterns inside that tag
body: <p>Here is a sample custom tag i have from a sitemap.xml</p>
  
  <pre><code>&lt;url&gt;
    &lt;loc&gt;http://sitename.com/programming/php/?C=D;O=A&lt;/loc&gt;
    &lt;changefreq&gt;weekly&lt;/changefreq&gt;
    &lt;priority&gt;0.64&lt;/priority&gt;
  &lt;/url&gt;
  </code></pre>
  
  <p>There are many entries like this and if you see loc tag it has c=d;0=a at the end.
  I want to remove all entries starting with <code>&lt;url&gt;</code> ending with <code>&lt;/url&gt;</code> which contains C=D;0=A or similar patterns like that.</p>
  
  <p>The following expression matched the whole of the above specified tag</p>
  
  <pre><code>&lt;url&gt;(.|\r\n)*?&lt;\/url&gt;
  </code></pre>
  
  <p>but I want to match like what i had specified in the above statement.</p>
  
  <p>How do we form regex to match such conditions(patterns) ?</p>