title: How to extract custom tokens in SQL Server NVarChar/VarChar field by using RegEx?
body: <p>Is there any way to extract the matched strings by using Regex in T-SQL(SQL Server 2005)?</p>
  
  <p>For example:</p>
  
  <blockquote>
    <p>Welcome [CT Name="UserName" /],
      We hope that you will enjoy our services and your subscription will be expired on [CT Name="ExpiredDate" /].</p>
  </blockquote>
  
  <p>I would like to extract the custom tokens in tabular format as follows:</p>
  
  <pre><code>[CT Name="UserName" /]
  [CT Name="ExpiredDate" /]
  </code></pre>
  
  <p>Thanks for your suggestion!</p>