title: Regular expressions inside SQL Server
body: <p>I have stored values in my database that look like <code>5XXXXXX</code>, where <code>X</code> can be any digit. In other words, I need to match incoming SQL query strings like <code>5349878</code>. </p>
  
  <p>Does anyone have an idea how to do it?</p>
  
  <p>I have different cases like <code>XXXX7XX</code> for example, so it has to be generic. I don't care about representing the pattern in a different way inside the SQL Server.</p>
  
  <p>I'm working with c# in .NET.</p>