title: Word boundary issue in a dynamic C# regex pattern
body: <p>I am trying to build a regex pattern with some parts of pattern retrieved from a database.</p>
  
  <p>For example</p>
  
  <pre><code>string pt= "@\"\\b(" + db.GetPattern + ")\\b\"";        
  Regex regex = new Regex(pt, RegexOptions.IgnoreCase | RegexOptions.Compiled);
  return regex.Replace(input, "*");
  </code></pre>
  
  <p>Although I tried to escape it, I couldn't get it to work. If I build the pattern manually as</p>
  
  <pre><code>Regex regex = new Regex(@"\b(test|test2)\b", RegexOptions.IgnoreCase | RegexOptions.Compiled);
  return regex.Replace(input, "*");
  </code></pre>
  
  <p>it works fine.</p>