title: Regex to match punctuation and alpha numeric characters
body: <p>I am trying to test a string to see if it contains characters other than alphanumeric or punctuation and, if it does, set an error. I have the code below, but it doesn't seem to work as it's letting "CZW205é" pass. I'm hopeless at regex and can't seem to resolve the problem. </p>
  
  <pre><code>if(!preg_match("/^[a-zA-Z0-9\s\p{P}]/", $product_id)) {
      $errors[$i] = 'Please only enter alpha-numeric characters, dashes, underscores, colons, full-stops, apostrophes, brackets, commas and forward slashes';
      continue;
  }
  </code></pre>
  
  <p>Thanks in advance for your help.</p>