title: need patindex to match a-zA-Z0-9./-#' and space
body: <p>I am cleaning up some data and would like to create a patindex that would reject any string contains any character(s) except for A-Za-z0-9./'-# and a space.</p>
  
  <p>This rejects the special chars which should be allowed:</p>
  
  <pre><code>patindex  (  '%[^A-Z0-9a-z./'-# ]%',stringtobetested )
  </code></pre>
  
  <p>Should I be masking the special chars? The bad and/or good chars can appear multiple times in a given string.</p>
  
  <p>So where stringtobetested is abc#D-EF should pass but abc*def should fail.</p>