Using preg_replace() is there a simple regexp to strip everything from a
string except alpha and numeric chars (a-zA-Z0-9)?
$input = "$tring1!";
$pattern =
$input = preg_replace($p attern, "", $input);
result: "tring1"
string except alpha and numeric chars (a-zA-Z0-9)?
$input = "$tring1!";
$pattern =
$input = preg_replace($p attern, "", $input);
result: "tring1"
Comment