Instalar ZYBERMART

Abre cualquier herramienta desde tu pantalla de inicio o el Dock, en su propia ventana. Las que ya has usado también funcionan sin conexión.

Probador de regex

Prueba expresiones regulares con coincidencias resaltadas en directo, grupos de captura, flags y vista previa de reemplazo.

/ / g

#MatchIndexGroups

Regex cheat sheet

PatternMatches
.Any character except a newline
\d \w \sDigit, word character (letter, digit, _), whitespace
[abc] [^abc] [a-z]One of a, b or c; anything but them; a range
* + ?0 or more, 1 or more, 0 or 1 (add ? to make lazy)
{2} {2,} {2,5}Exactly 2, at least 2, between 2 and 5
^ $ \bStart of text/line, end of text/line, word boundary
(…) (?:…) (?<name>…)Capture group, non-capturing group, named group
a|ba or b
(?=…) (?!…) (?<=…)Lookahead, negative lookahead, lookbehind

Useful patterns

  • Email address (simple): [\w.+-]+@[\w-]+\.[\w.-]+
  • URL: https?:\/\/[^\s]+
  • Date YYYY-MM-DD: \d{4}-\d{2}-\d{2}
  • Hex color: #(?:[0-9a-fA-F]{3}){1,2}\b
  • Extra spaces: {2,} (replace with one space)

Frequently asked questions

Which regex flavor does this tester use?

It uses JavaScript (ECMAScript) regular expressions, the same engine as your browser and Node.js. Most syntax is shared with Python, Java, C# and PCRE, but features such as lookbehind, named groups and Unicode classes can differ slightly between languages.

What do the flags mean?

g finds all matches instead of just the first, i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines, u enables full Unicode support, and y (sticky) only matches at the current position.

How do I use capture groups in the replacement?

Use $1, $2 and so on for numbered groups, $<name> for named groups, and $& for the whole match. For example, replacing (\w+)@(\w+) with $2 at $1 swaps the two parts.

Why does my pattern stop with “took too long”?

Some patterns, especially nested quantifiers like (a+)+, can take exponential time on certain input. The tester runs your regex in a background worker and stops it after a second, so the page never freezes. Simplify the pattern to fix it.

Inicia sesión en ZYBERMART

Ten tus CV, facturas, tarjetas de estudio, notas y herramientas guardadas en todos tus dispositivos. Es gratis, y las herramientas funcionan igual sin cuenta.

o

No necesitas contraseña. Al iniciar sesión aceptas los términos; consulta cómo tratamos tus datos en la política de privacidad.

Tu cuenta

Al cerrar sesión se guarda una copia de tu trabajo en este navegador. En un ordenador compartido, borra después los datos del navegador.

¿Qué quieres crear?

Diseños

Redes sociales

Documentos

Estudio

Editar

Ver las 282 herramientas