title: Exclude certain characters using RegEx
body: <p>Try as I might, I can't get a RegEx to exclude space or single quotes.</p>
  
  <ul>
  <li>The string "abc" is allowed</li>
  <li>Not allowed: "a'bc", "'", "'abc", "'''", "abc''" etc</li>
  <li>Spaces could replace the ' too in the above example</li>
  <li>Trailing and leading spaces are assumed to be removed already</li>
  <li>Empty strings are checked elsewhere</li>
  <li>Target language is javascript</li>
  </ul>
  
  <p>I'd use PATINDEX if I was in SQL.</p>
  
  <p>Or NOT a positive match on either space or single quote, if I could negate...</p>
  
  <p>I've tried (for single quote only)</p>
  
  <ul>
  <li><code>\w*[^']\w*</code></li>
  <li><code>^\w*[^']\w*$</code></li>
  <li>others I forget now</li>
  </ul>
  
  <p>Please put me out of my misery so I can sleep tonight.</p>
  
  <p>Edit:</p>
  
  <ul>
  <li>Target string will not be surrounded by Quotes. I thought thy might add clarity</li>
  <li>If "Target language is javascript" is wrong, then it's c#. I'd have to check where we do the validation exactly: client javascript or server c#</li>
  </ul>