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

**URL:** https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759
**Category:** Support
**Created:** [10월 10, 2017, 11:47오전 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759 "2017-10-10T11:47:30Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [10월 10, 2017, 11:47오전 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/1 "2017-10-10T11:47:30Z")

</div>

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](https://meta.discourse.org/t/replace-a-string-in-all-posts/48729) 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?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [10월 10, 2017, 12:30오후 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/2 "2017-10-10T12:30:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [10월 10, 2017, 12:49오후 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/3 "2017-10-10T12:49:01Z")

</div>

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… 😅

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [10월 10, 2017, 1:03오후 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/4 "2017-10-10T13:03:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [10월 10, 2017, 1:11오후 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/5 "2017-10-10T13:11:31Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [10월 10, 2017, 1:13오후 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/6 "2017-10-10T13:13:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [11월 8, 2019, 3:52오후 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/7 "2019-11-08T15:52:05Z")

</div>



---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [11월 9, 2019, 1:02오전 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/8 "2019-11-09T01:02:17Z")

</div>

이것은 감시 단어 → 대체 기능의 또 다른 용도입니다. @sam, 이 기능에 대해 깊은 회의적 입장을 보여왔다는 것을 알고 있지만, 실제로는 많은 목적을 수행합니다..

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [11월 9, 2019, 2:38오전 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/9 "2019-11-09T02:38:41Z")

</div>

추가로, 트리머를 통과하는 기이한 이메일 서명을 제거하는 데 사용할 수도 있습니다.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [8월 2, 2023, 1:35오전 UTC](https://meta.discourse.org/t/how-to-automatically-replace-a-double-exclamation-point-when-a-message-is-saved/71759/10 "2023-08-02T01:35:41Z")

</div>


