PHP: Search for single & double quotes and square brackets?

I'm trying to have preg_match search for single and double quotes and square brackets within a string.
However, preg_match's syntax is like a foreign language for me and I can't seem to figure out how to do this.
 
you can use something like this if you want to replace them

$InvalidChars=array("[",","]","'","\"");
$clean_name = str_replace($InvalidChars,"_",$_GET['key_name']);
 
Back
Top