title: How to regex in a MySQL query
body: <p>I have a simple task where I need to search a record starting with string characters and a single digit after them. What I'm  trying is this</p>
  
  <pre><code>SELECT trecord FROM `tbl` WHERE (trecord LIKE 'ALA[d]%')
  </code></pre>
  
  <p>And</p>
  
  <pre><code>SELECT trecord FROM `tbl` WHERE (trecord LIKE 'ALA[0-9]%')
  </code></pre>
  
  <p>But both of the queries always return a <code>null</code> record </p>
  
  <pre><code>trecord
  -------
  null
  </code></pre>
  
  <p>Where as if I execute the following query</p>
  
  <pre><code>SELECT trecord FROM `tbl` WHERE (trecord LIKE 'ALA%')
  </code></pre>
  
  <p>it returns</p>
  
  <pre><code>trecord
  -------
  ALA0000
  ALA0001
  ALA0002
  </code></pre>
  
  <p>It means that I have records that starts with ALA and a digit after it,</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I'm doing it using PHP MySQL and innodb engine to be specific.</p>