# Toegestane lengte van bekeken woorden verhogen

**URL:** https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249
**Category:** Feature
**Tags:** watched-words
**Created:** [5 oktober 2020 om 08:07 UTC](https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249 "2020-10-05T08:07:21Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![tkrunning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tkrunning/32/119481_2.png) [@tkrunning](https://meta.discourse.org/u/tkrunning)
#### Post date: [5 oktober 2020 om 08:07 UTC](https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249/1 "2020-10-05T08:07:21Z")

</div>

Hi guys,

I am trying to send posts containing (international) phone numbers to the approval queue, and am trying to add the following regex as a watched word:

```plaintext
^(\+|00)((?:9[679]|8[035789]|6[789]|5[90]|42|3[578]|2[1-689])|9[0-58]|8[1246]|6[0-6]|5[1-8]|4[013-9]|3[0-469]|2[70]|7|1)(?:\W*\d){0,13}\d$

```

However, it is over the current limit of 50 characters for watched words. I believe this limit made sense before regex was added as an option for watched words, but is there still a good reason for keeping this limit in place?

Or is there a way of overriding it?

---

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [2 december 2020 om 21:19 UTC](https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249/2 "2020-12-02T21:19:41Z")

</div>

I’m also need more than 50 chars for my RegEx for identifying IBAN:

`\b[A-Z]{2}[0-9]{2}(?:[]?[0-9]{4}){4}(?!(?:[]?[0-9]){3})(?:[]?[0-9]{1,2})?\b`

When do you think you will answer that request?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [6 december 2020 om 23:29 UTC](https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249/3 "2020-12-06T23:29:29Z")

</div>

There is no way of overriding this, I guess we are almost at the rule of 3 here about adding a longer limit.

@david are there any concerns around doubling the size?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [7 december 2020 om 00:04 UTC](https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249/4 "2020-12-07T00:04:23Z")

</div>

All watched words are combined to form a single regex, so we do need to be a little careful. But doubling to 100 is probably fine - no worse than two, 50 character “words”.

Here’s a PR for the change

[https://github.com/discourse/discourse/pull/11437](https://github.com/discourse/discourse/pull/11437)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [9 december 2020 om 08:26 UTC](https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249/5 "2020-12-09T08:26:08Z")

</div>

That’s merged - watched words can now be up to 100 chars long.

---

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [9 december 2020 om 08:50 UTC](https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249/6 "2020-12-09T08:50:37Z")

</div>

Thank you very much for that change! Have nice holidays and christmas!

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [9 december 2020 om 18:00 UTC](https://meta.discourse.org/t/increase-allowed-length-of-watched-words/166249/7 "2020-12-09T18:00:10Z")

</div>

This topic was automatically closed after 9 hours. New replies are no longer allowed.
