title: Sublime Text conditional find and replace
body: <p>It is possible to do a conditional find and replace in sublime text? I want to remove the external div class = "key-actions" but keep anything within them. The problem is the internal content will always be the same with maybe 3 different links at times</p>
  
  <pre><code>// this becomes
  &lt;div class="key-actions"&gt;
    &lt;a href="one-link.html"&gt;&lt;div class="btn btn-primary btn-block text-left"&gt;&lt;i class="icon-chevron-sign-right icon-showhouse2"&gt;&lt;/i&gt; One Link&lt;/div&gt;&lt;/a&gt;
    &lt;a href="two-link.html"&gt;&lt;div class="btn btn-primary btn-block text-left"&gt;&lt;i class="icon-chevron-sign-right icon-showhouse2"&gt;&lt;/i&gt; Two Link&lt;/div&gt;&lt;/a&gt;
  &lt;/div&gt;
  
  // this
  &lt;a href="one-link.html"&gt;&lt;div class="btn btn-primary btn-block text-left"&gt;&lt;i class="icon-chevron-sign-right icon-showhouse2"&gt;&lt;/i&gt; One Link&lt;/div&gt;&lt;/a&gt;
  &lt;a href="two-link.html"&gt;&lt;div class="btn btn-primary btn-block text-left"&gt;&lt;i class="icon-chevron-sign-right icon-showhouse2"&gt;&lt;/i&gt; Two Link&lt;/div&gt;&lt;/a&gt;
  </code></pre>