title: Check that a string contains either specific special characters, alphanumeric characters and ends in alphabetical
body: <p>I want to ensure any characters in a string contain alphanumeric characters along with <code>_</code> or <code>,</code> but the string HAS to end in a alphabetical character. There also can be no whitespace anywhere.</p>
  <p>I am trying this:</p>
  <p><code>'^[\Sa-zA-Z0-9,_][\SA-Za-z]+$'</code></p>
  <p>where I am expecting this to take care of the alphanumerics, special characters and whitepsace, <code>[\Sa-zA-Z0-9,_]</code></p>
  <p>and this:</p>
  <p><code>[\SA-Za-z]</code> to say use alphabetical characters at the very end, but that seems to fail such as:</p>
  <pre><code>import re
  
  s = 'lk78d1'
  
  regex = '^[\Sa-zA-Z0-9,_][\SA-Za-z]+$'
  
  if(re.search(regex,s)):  
          print(&quot;valid&quot;)  
          
  else:
       raise ValueError('non valid')
  </code></pre>