title: Find substring from string in sql
body: <p>I am using SQL SERVER 2008.I have following string in sql.</p>
  
  <pre><code>DECLARE @stringRTF VARCHAR(MAX)
  
  set @stringRTF = '{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}} \viewkind4\uc1\pard\f0\fs18 \v [\TEST\*#70_250_263] \v0 \par '
  </code></pre>
  
  <p>Now i want to find string "\TEST*#" from above string.
  if it is present in the full string then i want to cut string [\TEST*#70_250_263] from full string.</p>
  
  <p>So it should be return like </p>
  
  <pre><code>[\TEST\*#70_250_263]
  </code></pre>
  
  <p>as return string.</p>
  
  <p>So can any one help me out how to find and cut that string from original string?</p>
  
  <p>Thanks in advance.</p>