title: How to validate that there are no spaces between two characters in a string, using regex
body: <p>I am trying to validate that there <em>NO</em> spaces between two characters (or in the middle of a name) in a string.</p>
  
  <p>I want a regex that will accept " ab " and reject " a  b " .</p>
  
  <p>I tried using <code>"\\s*((_[a-zA-z]+)|([a-zA-Z]+[a-zA-Z0-9]*))\\s*"</code>
  and  <code>"(\\s*\\S\\s*)"</code> .</p>
  
  <p>p.s I don't care about spaces before and after the character\word.</p>
  
  <p>Thanks in advance!</p>