Regex Tester

Test regular expressions with live match highlighting and group capture.

Regex Tester

What it does

Tests regular expressions against input text with live match highlighting. Shows all matches, their positions, and captured groups in a table. Supports all standard JavaScript regex flags.

How to use

  1. Enter your regex pattern in the Pattern field
  2. Toggle flags (g=global, i=case-insensitive, m=multiline, s=dotall) as needed
  3. Enter test text below
  4. Matches are highlighted in the text and listed in a table

Common use cases

  • Developing and debugging regex patterns
  • Extracting data from text using capture groups
  • Validating input formats (emails, phone numbers, URLs)
  • Finding and replacing patterns in text editors
  • Understanding regex syntax

Privacy

All regex execution runs in your browser using JavaScript’s RegExp. No data is sent to any server.

FAQ

What regex flavor is supported? JavaScript’s ECMAScript regex syntax, including named capture groups ((?<name>...)), lookaheads, and lookbehinds.

What is the s (dotall) flag? Makes . match newlines as well as other characters.

How do I match multiple lines? Use the m flag to make ^ and $ match line beginnings and ends, and g to find all matches.

Testador de Regex

O que faz

Testa expressões regulares contra texto de entrada com destaque de correspondências ao vivo. Mostra todas as correspondências, suas posições e grupos capturados em uma tabela. Suporta todas as flags regex padrão do JavaScript.

Como usar

  1. Insira seu padrão regex no campo Padrão
  2. Alterne as flags (g=global, i=sem-distinção, m=multilinha, s=dotall) conforme necessário
  3. Insira o texto de teste abaixo
  4. As correspondências são destacadas no texto e listadas em uma tabela

Casos de uso comuns

  • Desenvolver e depurar padrões regex
  • Extrair dados de texto usando grupos de captura
  • Validar formatos de entrada (emails, telefones, URLs)
  • Encontrar e substituir padrões em editores de texto
  • Entender sintaxe regex

Privacidade

Toda a execução regex roda no seu navegador usando RegExp do JavaScript. Nenhum dado é enviado para nenhum servidor.

Ferramentas relacionadas

Perguntas frequentes

Qual flavor regex é suportado? Sintaxe regex ECMAScript do JavaScript, incluindo grupos de captura nomeados ((?<nome>...)), lookaheads e lookbehinds.

O que é a flag s (dotall)? Faz . corresponder a novas linhas além de outros caracteres.

Como corresponder múltiplas linhas? Use a flag m para fazer ^ e $ corresponderem ao início e fim das linhas, e g para encontrar todas as correspondências.