How would you preg_match for the symbol combination |~| or %*|
$harms = 'i.e. flow of electricity in contact with person(s)dsn fds fsdnfsnd fsd fmnds f|~|mnsdf <br /><br />ajshajkhsjkahs|~|';
if(preg_match('#\|~\|#', $harms)) {
echo 'true';
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to escape special chars in RegEx with a backslash
\:You could also use
preg_quote()to escape special chars: