Make sure the encoding used by your text editor / IDE is iso-8859-15 (if that is what you are trying to display).
If it is UTF-8 , you will have to perform another replacement, especially for it ( β¬ , represented by several bytes, I assume that it will not fit into the regular expression [...] block).
BTW, ereg_replace() deprecated in favor of preg_replace() .
Plus, why do you have two "regex" options? (I assume $regex also contains a $regex ?)
A suggestion (unverified) if what you want to do is to remove the other + characters in your original regular expression:
$val = preg_replace( array('/[^a-zA-Z0-9[:space:][:blank:]+\-]+/', '/β¬/'), '', $_REQUEST[$var] );
source share