This can’t be used for a normal character replace, only REGEX code is allowed!
Try PHP String Replace for an alternative
Nice Regex to replace characters not allowed into database
1 2 3 4 5 6 |
$newtag = preg_replace("/[^0-9a-zA-Z -]/", "", $newtag); //another version which may be depreciated (notice this lets in @ signs) $value= ereg_replace("[^A-Za-z0-9@]", "", $value); |