title: How to find all lines of code that start and end with specified string in VScode (using Regular Expression)
body: <p>How to find all lines of code that start and end with specified string in VScode
  and replace some part of those line with other string (using Regular Expression)?</p>
  <p><strong>For Example:</strong></p>
  <p><strong>1</strong>. Find all lines that start with <code>import</code> and end with <code>.ts</code> (with any number or chars allowed in between)</p>
  <p><strong>2</strong>. Delete only <code>.ts</code> part from all those lines</p>
  <p><em>For example:</em></p>
  <p>It should match lines like</p>
  <pre><code>import { AddToCompare } from '@Booking/core/modules/compare/AddToCompare.ts'
  </code></pre>
  <p>and then remove <code>.ts</code> from end from all those lines to make it</p>
  <pre><code>import { AddToCompare } from '@Booking/core/modules/compare/AddToCompare'
  </code></pre>
  <p>PS:
  To find lines starting with <code>import</code> I used <code>^\s*import</code>
  but dont know what expression to use for rest of the pattern.</p>
  <p>Also most solutions here are for python and grep but not for vscode.</p>