# Localizar e substituir texto

> Localize e substitua texto literal ou uma expressão regular.

[Open tool](https://www.toolcabana.com/pt-pt/replace-text) · [Texto e escrita](https://www.toolcabana.com/pt-pt/category/text-and-writing)

Tool ID: replace-text. Requested language: pt-PT. Description language: pt-PT. Complete guide translation: yes.

## Overview (en)

Find and Replace Text swaps every occurrence of a word or phrase in your text for the replacement you enter. Matching is case-sensitive by default and treats the search as literal text. Switch on Use regular expression to search with a JavaScript pattern and reuse captured groups in the replacement, or leave Replace with empty to delete every match.

## Supported tasks (pt-PT)

Localize e substitua texto literal ou uma expressão regular.

## Steps (pt-PT)

1. Escreva ou cole o seu texto, ou carregue um exemplo.
2. Altere as definições básicas ou abra o modo avançado para ajustar o resultado.
3. Verifique e copie ou descarregue o resultado. Coloque os resultados em direto em pausa para executar manualmente. Textos ou definições individuais com mais de 20,000 caracteres exigem uma execução explícita.

## Settings

- Localizar (pt-PT; key: find; type: text)
- Substituir por (pt-PT; key: replacement; type: text)
- Utilizar expressão regular (pt-PT; key: regex; type: checkbox)
- Distinguir maiúsculas de minúsculas (pt-PT; key: caseSensitive; type: checkbox)

## Limitations (pt-PT)

As operações de texto geralmente aceitam até 2,000,000 caracteres. Cada analisador, gerador ou fórmula aplica limites adicionais apresentados nos respetivos controlos.

## Example input

```text
Hello world.
A second line.
Café, İstanbul, 日本語, and 👨‍👩‍👧‍👦.
```

## Privacy and connections (pt-PT)

Esta operação processa o texto no seu navegador. Copiar e descarregar exigem uma ação explícita; o texto introduzido não é guardado numa conta nem no histórico.

## Questions (pt-PT)

### How do I use capture groups in a regex find and replace?

Enable Use regular expression, wrap parts of the pattern in parentheses and refer to them as $1, $2 and so on in Replace with. For example, the pattern (\d+)-(\d+) with the replacement $2-$1 swaps the two numbers.

### Is find and replace case-sensitive?

Match case is on by default, so Apple will not match apple. Turn it off to replace every capitalization variant. In literal mode, special characters such as dots or brackets in the search text are matched exactly as written.

### Why does my regular expression stop with an execution limit error?

Regular expressions run in a separate worker and are stopped after 750 milliseconds so the page does not hang. Patterns with heavy backtracking can hit this limit. Regex mode also accepts up to 500,000 characters of input and a 2,000-character pattern.

### Onde é processado o meu texto?

Esta operação processa o texto no seu navegador. Copiar e descarregar exigem uma ação explícita; o texto introduzido não é guardado numa conta nem no histórico.

### Quais são os limites de entrada?

As operações de texto geralmente aceitam até 2,000,000 caracteres. Cada analisador, gerador ou fórmula aplica limites adicionais apresentados nos respetivos controlos.

## Related tools

- [Reverse text](https://www.toolcabana.com/pt-pt/reverse-text)
- [Text difference checker](https://www.toolcabana.com/pt-pt/text-diff)
- [Bold Unicode text](https://www.toolcabana.com/pt-pt/bold-text)
- [Italic Unicode text](https://www.toolcabana.com/pt-pt/italic-text)
