Can you mix preg_replace and POSIX or do you have to use PCRE?
I am trying to clean up all non-printable items in 1 function I have
//get rid of non-printables
$string = preg_replace("/[^[[[:print]][[:space:]]]]/", '', $string);
Later on another function (that is optional) MIGHT have to clean it up more and if so it tries to do this
//done calling trim and strip_tags, now more cleaning
//stuff thats okay for email
$message = preg_replace("/[^a-zA-Z0-9_,#'%&\"\-\.\?\!\~\=\/\$\\n\r\s]/", '', $message);
//stuff not safe for webpage
$message = preg_replace("/[`;\*\^\|\\\<\>\f\t\v]/", '', $message);
I'm so confused, been trying to figure this out 😕