title: tsql last "occurrence of" inside a string
body: <p>I have got field containing comma separated values. I need to extract the last element in the list.
  I have tried with this:</p>
  <pre><code>select list_field, LTRIM(RTRIM(right(list_field, len(list_field) - CHARINDEX(',',list_field))))
  </code></pre>
  <p>But it returns the last part of the list just starting after the first comma occurrence.
  For example,</p>
  <blockquote>
  <p>a,b returns b</p>
  <p>a,b,c returns b,c</p>
  </blockquote>
  <p>I would like to use a regex like pattern. Is it possible in TSQL (sql server 2008)?
  Any other clues?</p>