Localizar / Substituir

Busca texto ou expressões regulares e substitui as correspondências.

Entrada: TextoResultado: Texto

Entrada de texto

Opções

Exemplos

Normalize repeated spaces in a copied HTTP request

Entrada

GET    /health  HTTP/1.1
Host:   example.org

Expected answer

GET /health HTTP/1.1
Host: example.org
Encontrar
{"option":"Regex","string":"[ \\t]+"}
Substituir
Correspondência global
On
Sem distinção entre maiúsculas e minúsculas
Off
Correspondência de múltiplas linhas
On
Ponto corresponde a todos
Off
Redact a demo bearer token while retaining the header name

Entrada

Authorization: Bearer DEMO_TOKEN_NOT_VALID
Accept: application/json

Expected answer

Authorization: Bearer [REDACTED]
Accept: application/json
Encontrar
{"option":"Regex","string":"(Authorization: Bearer )\\S+"}
Substituir
$1[REDACTED]
Correspondência global
On
Sem distinção entre maiúsculas e minúsculas
Off
Correspondência de múltiplas linhas
On
Ponto corresponde a todos
Off
Move endpoint URLs to a new hostname literally

Simple string treats the dots as dots, rather than regular-expression wildcards.

Entrada

https://old.example.org/v1/status
https://old.example.org/v1/jobs

Expected answer

https://api.example.org/v1/status
https://api.example.org/v1/jobs
Encontrar
{"option":"Simple string","string":"old.example.org"}
Substituir
api.example.org
Correspondência global
On
Sem distinção entre maiúsculas e minúsculas
Off
Correspondência de múltiplas linhas
On
Ponto corresponde a todos
Off
Complete only the first item in a task list

Entrada

TODO: write test
TODO: deploy

Expected answer

DONE: write test
TODO: deploy
Encontrar
{"option":"Simple string","string":"TODO"}
Substituir
DONE
Correspondência global
Off
Sem distinção entre maiúsculas e minúsculas
Off
Correspondência de múltiplas linhas
On
Ponto corresponde a todos
Off
Disable debug flags with case-insensitive line matching

Entrada

DEBUG=true
port=8080
debug=true

Expected answer

debug=false
port=8080
debug=false
Encontrar
{"option":"Regex","string":"^debug=(?:true|false)$"}
Substituir
debug=false
Correspondência global
On
Sem distinção entre maiúsculas e minúsculas
On
Correspondência de múltiplas linhas
On
Ponto corresponde a todos
Off

Parâmetros

ParâmetroValor padrãoEntrada e opções
Encontrar{"option":"Regex","string":""}Codificação da chave ou do texto: Regex, Extended (\n, \t, \x...), Simple string
Substituir""Sequências de escape como \n, \r e \t são aceitas
Correspondência globaltrueAtivado ou desativado
Sem distinção entre maiúsculas e minúsculasfalseAtivado ou desativado
Correspondência de múltiplas linhastrueAtivado ou desativado
Ponto corresponde a todosfalseAtivado ou desativado

Ferramentas relacionadas

Utilitários

Referência da operação

Ver a documentação técnica original (English)