title: how to verify a string format in SQL server
body: <p>I'm working on a data import using sql server stored procedure. the data format is like:</p>
  
  <blockquote>
    <p>A7(5)B666</p>
  </blockquote>
  
  <p>the '5' is a variable, it could be multiple digital #, i.e. 10, 123, ....</p>
  
  <p>the '666' is a variable too. it is a text string, each char is '6', but could have any # of '6', i.e. 666666, 66, 6, 66666666666.</p>
  
  <p>other part, <code>A7()B</code> are fixed.</p>
  
  <p>Is there a simple way to validate this in SP? I could parse the string using substring, but it seems too complex since I have to verify the <code>#</code>. Is there a method similar to regular expression in sql server? can I use <code>LIKE</code> operator? I could not find how to use it other than in <code>WHERE</code> clause.</p>
  
  <p>thanks</p>