Illegal words in in-depth Filter articles

< H1 > contraband words in deep Filter articles < / H1 >
example: the keyword of Filter is "moments", while in title it may be "I am a circle of friends", "I am a circle of friends", and so on, and so on, there may be different characters to be segmented among the keywords to be blocked. How can this type of title depth Filter these keywords?
Regular Filter, such as

str_replace, cannot detect special characters in title, such as "I am a friend * circle"

Php
Mar.05,2021

first Filter drop the special characters in Filter the keyword you want Filter
if Filter special character, Filter keyword is 0, then use the original string
if Filter keyword is not 0, use Filter string


$array = ['xxx' = >' *']
strtr ($str, $arr);


).
$pattern = array('/([\s\S]?)*([\s\S]?)*/i','/[\s\S]?/i','/[\s\S]?/i');
$replacement = '***';
echo  preg_replace($pattern, $replacement, $str);

removed

with regularization
Menu