# Expressão regular de palavra observada falha (2025)

**URL:** https://meta.discourse.org/t/watched-word-regular-expression-crash-2025/382417
**Category:** Bug
**Tags:** regex, watched-words
**Created:** [Setembro 12, 2025, 9:11am UTC](https://meta.discourse.org/t/watched-word-regular-expression-crash-2025/382417 "2025-09-12T09:11:45Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [Setembro 12, 2025, 9:11am UTC](https://meta.discourse.org/t/watched-word-regular-expression-crash-2025/382417/1 "2025-09-12T09:11:45Z")

</div>

Semelhante a [este](https://meta.discourse.org/t/watched-word-regular-expression-crash/275701)

### Repro

- Expressões regulares de palavras monitoradas ativadas
- Ação de tag de palavras monitoradas
- Expressão regular `*abc`

### Resultado

É impossível criar tópicos ou postagens

```plaintext
RegexpError (alvo do operador de repetição não especificado: /(*abc)/i)
app/services/word_watcher.rb:239:in `initialize'
app/services/word_watcher.rb:239:in `new'
app/services/word_watcher.rb:239:in `word_matches?'
lib/topic_creator.rb:214:in `block in setup_tags'
lib/topic_creator.rb:213:in `each'
lib/topic_creator.rb:213:in `setup_tags'
lib/topic_creator.rb:48:in `create'
lib/post_creator.rb:493:in `create_topic'

```

### Causa

- `*` significa “repetir o token anterior zero ou mais vezes”
- não há token anterior

---

_[View the full topic](https://meta.discourse.org/t/watched-word-regular-expression-crash-2025/382417)._
