To be honest, the title is quite convoluted and difficult to explain in one sentence.
1. First of all, in order to prevent intentional people from being clever when they explode, they add punctuation marks to the vulgar language to escape the disaster. Therefore, the code adds punctuation marks in the user's words before matching with the keywords. The symbols have been removed. If the words after removing the punctuation marks match a certain keyword, it will be blacklisted. (This is not my problem...)
2. [My question is here] So how do I highlight the sentence that has not removed the punctuation marks and trigger the sentence to enter the blacklist?
example:
Why are you so stupid? ? ? I,,,fuck! ->It is related to the filter word "I rely on you", so you need to highlight the string "I,,, rely on"
闭关修行中......