Hello I'm trying to parse string chars to prevent sql injection and other hacks. I don't want to use mysql_real_escape_string or other filters. I want to just use a regex and have characters A-Z 0-9 !@#$-_
I mean I could use a regex such as:
$newStr = preg_replace('/[^a-z0-9]/i', '_', $str);
but I just want to be safe and I'm not very good at regex. Thanks again guys, you really are awesome.