title: filter_var using FILTER_VALIDATE_REGEXP
body: <p>I'm practicing my beginner php skills and would like to know why this script always returns FALSE?</p>
  
  <p>What am i doing wrong?</p>
  
  <pre><code>$namefields = '/[a-zA-Z\s]/';
  
  $value = 'john';
  
  if (!filter_var($value,FILTER_VALIDATE_REGEXP,$namefields)){
      $message = 'wrong';
      echo $message;
  }else{
      $message = 'correct';
      echo $message;
  }
  </code></pre>