How to automatically replace a double exclamation point when a message is saved?

I’m looking for a way to prevent double exclamation points when a user replies to messages.

In my particular case I have a super-user who has the bad habit (since 15 years) to conclude each sentence with !!

All older users know it is his way to write but new users often feel attacked by him (even if it is not his intention).
This sometimes generates bad responses from new users and I have to intervene to calm the situation.

Consider that I asked him several times to avoid !! at the end of a sentence, but his answer is that he does it unconsciously.

I know that I can use Replace a string in all posts to replace !! with a point, but this would only work on posts already published, not on those that will be published.

The only way I can think is to enter !! in watched words so that they are replaced by two black squares, but I find this method a little exaggerated.

Is there any other way?

1 Like

IMHO the best way would be to write a plugin that would automatically replace [\s!]+$ by a single !.

1 Like

Well, writing a plugin for a single user does not seem very useful, I thought of something less challenging, such as a js script or something like that… :sweat_smile:

There is a censored pattern site setting. You could replace his bangs with blocks. It would K silly, but no more silly than what he’s doing.

Or, you could have him pay to develop the plugin since he’s unwilling to reprogram himself.


After 15 years I think it has become a real mania or something that goes beyond his control.
He writes in this way not only on our forum, but everywhere, even on facebook and twitter.

BTW I think I will use the censored pattern you’ve suggested to me if there are no other alternatives.

1 Like

I was kidding about how funding the plugin. If he cared, there are browser plugins that could catch that for him

1 Like

This is another use for watched words → replacement @sam, I know you have been deeply skeptical of this feature, but it in fact serves a lot of purposes…


An additional use could be to strip the odd email signatures that get past the trimmer.