title: How to check in php if string contains special characters like { and }
body: <p>There is this input field where I want that user ISN'T able to use following special marks: {}[]$</p>
  
  <p>Right now I have following solution in my code but problem is that it isn't allowing ä, ö, ü or other characters like that. </p>
  
  <pre><code>if (preg_match('/^[-a-zA-Z0-9 .]+$/', $string)  || empty($string)){
  echo "Everything ok!";
  else{ 
  echo "Everything not ok!";}
  </code></pre>
  
  <p>Because of that, I tried using preg_match('/^[\p{L}\p{N} .-]+$/', $string) because it was said to allow characters from any language but that solution isn't allowing marks like @ and *, which I think may be needed. So any solution which would allow anything except {}[]$ -marks? Any help is much appreciated since I can't figure out what to write to get this working.</p>