title: preg_match matching specific characters = { } [] *
body: <pre><code>if (preg_match('/[^a-zA-Z]+/', $test4, $matches))
  </code></pre>
  
  <p>This will match any non alphanumeric character. I only want a match on <code>{ } [ ] * =</code> regardless of order and any other characters between them. Can this be done?</p>
  
  <p>I have tried <code>\=, \[, \], \{, \}, \*</code> but that didn't seem to help?</p>
  
  <p>I have a string that may or may not contain the characters listed. I would like to use preg_match to find out if the string does contain any of those characters, regardless of order or position in string.</p>