title: How to extract numbers from a string using TSQL
body: <p>I have a string:</p>
  
  <p><code>@string='TEST RESULTS\TEST 1\RESULT 1</code></p>
  
  <p>The string/text remains the same except for the numbers</p>
  
  <ol>
  <li>need the 1 from TEST</li>
  <li>need 1 from RESULT</li>
  </ol>
  
  <p>to be used in a query like:</p>
  
  <pre><code>SET @sql =  "SELECT *
              FROM   TABLE
              WHERE  test = (expression FOR CASE 1 resulting IN INT 1)
                     AND result = (expression FOR CASE 2 resulting IN INT 1)"
  </code></pre>