Your order of events is all wrong.
You are doing the preg_replace() on the $_POST['address'] value you are doing it on the $address value.
This should go at the very top of your scripts.
if ( get_magic_quotes_gpc() ) {
// magic_quotes is on, need to strip slashes
$_POST = array_map("stripslashes", $_POST);
}
not in the middle of your case statement. Look closely at what the statement does and you will understand why you need to place it at the very top of your scripts.
Secondly, you are grabbing your copy of $address = $_POST['address'] before you run the above code. So the backslash(s) will still be in the string.
Plus, in your preg_replace, your replacement string is a space. You are going to end up with extra spaces in your string, just because you are putting them in it.
Change the replacement value to nothing an empty string.
Next time, try echoing the correct variable and make sure that your order of events are correct.