# Substituir palavra não incluindo curinga

**URL:** <https://meta.discourse.org/t/replace-word-not-including-wildcard/190379>\
**Category:** Bug\
**Created:** [Maio 14, 2021, 6:36am UTC](https://meta.discourse.org/t/replace-word-not-including-wildcard/190379 "2021-05-14T06:36:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)\
**Post date:** [Maio 18, 2021, 7:49am UTC](https://meta.discourse.org/t/replace-word-not-including-wildcard/190379/4 "2021-05-18T07:49:59Z")

</div>

O caractere curinga torna necessário o uso de expressões regulares ao fazer correspondências, independentemente do valor de watched\_words\_regular\_expression. Isso ocorre porque \* é convertido em \S\*. Corrigi o problema em:

> <https://github.com/discourse/discourse/pull/13084>
>
> Watched words are always regular expressions, despite watched\_words\_
> \_regular\_e…xpressions being enabled or not. Internally, wildcard
> characters are replaced with a regular expression that matches any non
> whitespace character.

---

_[View the full topic](https://meta.discourse.org/t/replace-word-not-including-wildcard/190379)._
