title: Regex for empty string or white space
body: <p>I am trying to detect if a user enter whitespace in a textbox:</p>
  
  <pre><code> var regex = "^\s+$" ; 
   if($("#siren").val().match(regex)) {
       echo($("#siren").val());
       error+=1;
      $("#siren").addClass("error");
      $(".div-error").append("- Champ Siren/Siret ne doit pas etre vide&lt;br/&gt;");
   }
  </code></pre>
  
  <p><code>if($("#siren").val().match(regex))</code> is supposed to match whitespace string, however, it doesn' t seems to work, what am I doing wrong ?</p>
  
  <p>Thanks for your helps</p>