Testador de Regex

Valide padrões Regex em tempo real.

Resumo:Testa expressões regulares em textos destacando os resultados encontrados.

Regular Expression Parameters

//g
Expression Flags
Pattern Match Status
0 Matches
Live Highlight Preview
Hello World 1234, order 5678
Regex Quick Cheat-Sheet Reference
Character Classes
  • . - Any character except newline
  • \d - Any digit (0-9)
  • \w - Word character (a-z, A-Z, 0-9, _)
  • \s - Whitespace character
  • [abc] - Any character in brackets
  • [^abc] - Any character NOT in brackets
Quantifiers
  • * - 0 or more times
  • + - 1 or more times
  • ? - 0 or 1 time (optional)
  • {n} - Exactly n times
  • {n,} - n or more times
  • {n,m} - Between n and m times
Anchors & Groups
  • ^ - Start of string / line
  • $ - End of string / line
  • \b - Word boundary
  • (abc) - Capture group
  • (?:abc) - Non-capturing group
  • (?<name>abc) - Named capture group

Embed this Tool on Your Website

Copy this code snippet to add the Testador de Regex to your blog or website for free. It adjusts dynamically to mobile and desktop screens.

Share This Tool

Como usarTestador de Regex

1. Insira seu padrão Regex e flags. 2. Cole o texto de teste. 3. Veja os resultados destacados.

Como funcionaTestador de Regex

Processa via motor RegExp do navegador.

Fórmula:Match = texto.matchAll(new RegExp(pattern, flags))
Exemplo de cálculo:

\d{3}\.\d{3}\.\d{3}-\d{2} valida o formato de CPF.

Perguntas frequentes

Sim, a avaliação ocorre instantaneamente a cada tecla digitada.