Views:
The following are examples of keywords that end with a punctuation mark:
  • word!
  • word?
  • word,
  • word.
  • word;
  • word:
  • word/
  • word\

If you want to block the words above, you may use the following regular expression:

\bWORD[!,;:\./?]+\b

where:

b(in the beginning and end) means word boundary or whole word matching. This is different from \s, which matches a white space.
WORDis the target word. IMSS is not case sensitive by default so it will match any combination of uppercase and lowercase letters.
[!,;:\./?]is the bracket that contains choices of characters specifically punctuations. Regex will match anything that is inside [ ]. [ ] represents only one character.
+means any number of the preceding character (that means those inside the [ ])