title: Using 'LIKE' and 'REGEXP' in a SQL query
body: <p>I'm trying to use some regex on an expression where I have two conditions on the <code>WHERE</code> clause. The pattern I want to capture is 106 followed by any digit followed by a digit that must be either 3 or 4, i.e. <code>106[0-9][3-4]</code></p>
  
  <p>First, I tried this:</p>
  
  <pre><code>SELECT DISTINCT Loggers
  FROM [alo].[Forests] C
  WHERE (R.LogSU = 3)
  AND (ForestID REGEXP '106[0-9][3-4]') 
  </code></pre>
  
  <p><strong>This produced an error as below and it would be good to know why.</strong></p>
  
  <pre><code>Msg 102, Level 15, State 1, Line 16
  Incorrect syntax near 'REGEXP'.
  </code></pre>
  
  <p>Next, I have tried this, which is now running but I am unsure about whether this is doing what I want it to do.</p>
  
  <pre><code>SELECT DISTINCT Loggers
  FROM [alo].[Forests] C
  WHERE (R.LogSU = 3)
  AND (ForestID LIKE '106[0-9][3-4]') 
  </code></pre>
  
  <p><strong>Would this do as I described above?</strong></p>