Probador de Regex
Build, test and debug JavaScript regular expressions in real time. Live highlighting, capture groups, replace preview. Supports lookbehind, named groups and Unicode.
Test string
Highlighted
Replace result
A real-time regex playground in your browser
Build and debug regular expressions interactively. As you type the pattern, the test string is re-evaluated and matches are highlighted instantly. Capture groups (both numbered and named) show up in a side panel with their values for every match. No round-trip to a server, no signup, nothing tracked.
Sabor regex nativo de JavaScript
We use the browser's own RegExp engine, which means the patterns you test here
will behave exactly the same in your JavaScript code. Modern features are all
supported: lookbehind (?<=...), named groups
(?<name>...), Unicode property escapes \p{...},
and the s (dotall) flag.
Modo reemplazar
Toggle replace mode to preview a regex-based substitution. The replacement supports all the
standard $ tokens: $1, $2 for numbered groups,
$<name> for named groups, $& for the full match,
$` for text before the match, $' for text after, and
$$ for a literal dollar sign.
Protección ReDoS
Catastrophic backtracking — patterns like (a+)+$ on long input — can hang any
regex engine. We have two safety nets:
- Hard timeout: if matching takes longer than 2 seconds, we abort and tell you.
- Match cap: a maximum of 10,000 matches per evaluation. Beyond that we stop and mark "10000+" so the UI stays responsive.
Privacidad
Your patterns and test text never leave the page. The engine is built into your browser. No external library is loaded, no analytics fires when you type, no requests go out.
Casos de uso frecuentes
- Validate email, URL, phone or postal-code patterns.
- Extract structured data from logs or scraped text.
- Build search-and-replace queries before running them in your editor.
- Debug a regex that "should work but doesn't" — the highlight makes the problem visible immediately.
- Learn regex by experimentation with the cheatsheet at the bottom.
Preguntas Frecuentes
- ¿Cómo pruebo una expresión regular en línea?
- Pega tu patrón regex en el campo de patrón y tu cadena de prueba en el área de texto. Las coincidencias se resaltan en tiempo real mientras escribes, con los grupos de captura mostrados en el panel lateral.
- ¿Este tester de regex soporta todos los flags de JavaScript?
- Sí, soporta todos los flags de regex de JavaScript: g (global), i (insensible a mayúsculas), m (multilínea), s (dotall), u (unicode) e y (sticky).
- ¿Mi regex o datos de prueba se almacenan en algún lugar?
- No. Todo se ejecuta localmente en tu navegador. Tus patrones y texto de prueba nunca se envían a ningún servidor ni se almacenan en ningún lugar.
- ¿Puedo exportar mis coincidencias de regex?
- Sí. Todos los grupos de coincidencia y grupos de captura se muestran en el panel de resultados, y puedes usar el modo Reemplazar para previsualizar sustituciones basadas en regex.
- ¿Este tester de regex es gratis?
- Sí, completamente gratis sin límites de uso, sin registro requerido y sin anuncios interrumpiendo tu flujo de trabajo.