title: Regex expression to allow an apostrophe
body: <p>I've been looking at all of the other posts regarding this topic but I'm still unable to get my regex expression to allow an apostrophe. I thought the following should work but it keeps giving an error. It does allow all of the other characters, numbers and letters, just not the ' (I need it for words like Mike's )</p>
  
  <pre><code>/^([-a-zA-Z\/\-\&amp;\\\?\!\,\.\'\"\s0-9@:=_]{1,1000})$/
  </code></pre>
  
  <p>The regex expression is required for validation of a form and part of the following:</p>
  
  <pre><code>public $regex = array ('char' =&gt; "/^[a-zA-Z.\s]{0,50}$/", 
                         'misc' =&gt; "/^([-a-zA-Z\/\-\&amp;\\\?\!\,\.\'\"\s0-9@:=_]{1,1000})$/");
  
  if(preg_match($this-&gt;regex[$validation],$this-&gt;filteredValue[$fieldName])) { 
      $this-&gt;messageArray[$fieldName] = '&lt;span class="cheers"&gt; &amp;nbsp; Thank You&lt;/span&gt;';   
  }
  </code></pre>
  
  <p>Can anybody tell me where I am going wrong please?</p>