Consulta de chuleta de Regex

Referencia con búsqueda de más de 100 tokens de regex con ejemplos en vivo, biblioteca de patrones comunes, probador integrado y notas entre variantes para JS, Python, PCRE y POSIX.

Actualizado

Share:
Home/Developer Tools/Regex Cheatsheet Lookup

Regex Cheatsheet Lookup

Searchable reference for 100+ regex tokens with live examples, common pattern library, inline tester, and cross-flavor notes for JavaScript, Python, PCRE, and POSIX.

68 tokens
14 common patterns
4 flavors

Character Classes
13

Any digit (0-9).
\d+Order #12345 on 2024
\dabc 7 xyz
Any non-digit character.
\D+123abc456
Any word character (a-z, A-Z, 0-9, _).
\w+hello_world!
Any non-word character.
\Whi!
Any whitespace (space, tab, newline).
a\sba b
Any non-whitespace character.
\S+ hello
Any character except newline (unless s flag is set).
h.that hot hit
Character set — matches any one of a, b, or c.
[aeiou]hello
Negated character set — any char except a, b, or c.
[^aeiou]+hello
Character range — any lowercase letter.
[a-z]+ABC xyz 123
Any uppercase letter.
[A-Z]+Hello World
Any digit (same as \d in ASCII mode).
[0-9]{3}tel 555 ok
Any alphanumeric character.
[a-zA-Z0-9]+_abc123_

Anchors & Boundaries
7

Start of string (or line with m flag).
^HelloHello world
End of string (or line with m flag).
world$Hello world
Word boundary.
\bcat\bthe cat sat
Non-word boundary.
\Bcatconcatenate
Start of input (PCRE/Python — not JS).
\AHelloHello world
End of input (PCRE/Python — not JS).
world\ZHello world
Absolute end of string (PCRE).
end\zthe end

Quantifiers
11

Zero or more (greedy).
ab*a abbb
One or more (greedy).
ab+a abbb
Zero or one (optional).
colou?rcolor
Exactly n times.
\d{4}year 2024
n or more times.
\d{2,}1 22 333
Between n and m times.
\d{2,4}12345
Lazy zero or more — matches as few as possible.
<.*?><b>hi</b>
Lazy one or more.
\d+?12345
Lazy optional.
ab??ab
Lazy bounded quantifier.
\d{2,4}?12345
Possessive quantifier (PCRE) — no backtracking.
a*+baaab

Groups & Lookarounds
10

Capturing group.
(\d+)-(\d+)2024-04
Non-capturing group.
(?:ab)+ababab
Named capturing group.
(?<year>\d{4})year 2024
Backreference to group 1.
(\w)\1letter
Named backreference.
(?<q>["']).*?\k<q>"hi"
Positive lookahead — followed by abc.
\d+(?=px)10px 20em
Negative lookahead — not followed by abc.
\d+(?!px)10em 20px
Positive lookbehind — preceded by abc.
(?<=\$)\d+price $99
Negative lookbehind — not preceded by abc.
(?<!\$)\d+100 $99
Atomic group (PCRE) — no backtracking.
(?>a+)baaab

Alternation
2

Alternation — matches left OR right.
cat|dogI have a dog
Grouped alternation.
(red|green|blue)sky is blue

Escapes & Special Characters
9

Literal dot.
\.comsite.com
Literal forward slash (needed in /.../ syntax).
\/api/api/v1
Literal backslash.
\\npath\name
Newline character.
a\nba b
Tab character.
\t+a b
Carriage return.
\r\nline
Null character.
\0
Hex character (2 digits).
\x41A
Unicode character (4 hex digits).
\u00e9café

Flags / Modifiers
7

Global — find all matches.
/a/gbanana
Case-insensitive.
/hello/iHELLO
Multiline — ^ and $ match line starts/ends.
/^foo/mbar foo
Dotall — . matches newlines.
/a.b/sa b
Unicode mode — enables \p{} and proper unicode handling.
/\p{L}/ucafé
Sticky — matches only at lastIndex (JS).
/foo/yfoofoo
Extended — ignore whitespace & allow comments (PCRE/Python).
/ \d+ /xnum 42

Unicode Properties
9

Any Unicode letter (requires u flag in JS).
\p{Letter}+café123
Short form for Letter.
\p{L}
Any Unicode numeric character.
\p{Number}+abc123
Short form for Number.
\p{N}
Uppercase letter.
\p{Lu}+Hello
Lowercase letter.
\p{Ll}+Hello
Punctuation character.
\p{Punct}hi!
Characters from a specific script.
\p{Script=Greek}+hi Αθήνα
Negated — any non-letter.
\P{L}+abc 123

Preguntas Frecuentes

¿Qué es el Regex Cheatsheet Lookup?

El Regex Cheatsheet Lookup es una herramienta en línea gratuita: una referencia buscable de más de 100 tokens de regex con ejemplos en vivo, una biblioteca de patrones comunes, un probador integrado y notas entre variantes para JS, Python, PCRE y POSIX. Funciona por completo en tu navegador, sin instalación ni registro.

¿Qué variantes de regex se cubren?

JavaScript (ECMAScript), Python (re/regex), PCRE (PHP/Perl) y POSIX (BRE/ERE). La pestaña Variantes resalta las diferencias: anclas \A/\Z, cuantificadores posesivos, clases POSIX.

¿El probador integrado se ejecuta localmente?

Sí. Cada coincidencia y resaltado se calcula en tu navegador mediante el objeto nativo RegExp de JavaScript. Nada se envía a un servidor.

¿Puedo copiar patrones directamente?

Sí: haz clic en Copiar junto a cualquier token o patrón común (Email, URL, IPv4, UUID, contraseña segura, etc.) para poner el patrón en bruto en tu portapapeles.

¿El Regex Cheatsheet Lookup es gratis?

Sí, el Regex Cheatsheet Lookup es 100% gratis, sin registro, sin tarifas ocultas y sin límites de uso. Todo el procesamiento se realiza localmente en tu navegador, garantizando una privacidad total.

¿Mis datos están seguros con esta herramienta?

Por supuesto. El Regex Cheatsheet Lookup procesa todo en el lado del cliente, dentro de tu navegador. No se sube ni se almacena ningún dato en ningún servidor. Tu contenido permanece privado en tu dispositivo en todo momento.

¿El Regex Cheatsheet Lookup funciona en dispositivos móviles?

Sí, el Regex Cheatsheet Lookup es totalmente adaptable y funciona en smartphones y tablets. Puedes usarlo en cualquier dispositivo con un navegador web moderno, sin necesidad de descargar ninguna app.

¿Necesito crear una cuenta para usar esta herramienta?

No se necesita ninguna cuenta ni registro. Simplemente abre el Regex Cheatsheet Lookup en tu navegador y empieza a usarlo de inmediato. No hay muros de registro ni restricciones de uso.

¿Qué lenguajes de programación o formatos admite?

El Regex Cheatsheet Lookup admite una amplia gama de formatos y lenguajes populares. Consulta la interfaz de la herramienta para ver la lista completa de opciones disponibles.

¿Cómo uso el Regex Cheatsheet Lookup?

Solo tienes que introducir tu entrada en el campo indicado, ajustar la configuración a tu gusto y la herramienta la procesará al instante. Después puedes copiar el resultado al portapapeles o descargarlo.

Acerca de Consulta de chuleta de Regex

Consulta de chuleta de Regex es una herramienta gratuita que funciona en el navegador, dentro de nuestra colección de Herramientas para desarrolladores. Todo se ejecuta localmente en tu dispositivo: sin subir archivos, sin registro y con tus datos siempre privados.

regex cheatsheetregex referenceregex patternsregex libraryregex testerfree regex cheatsheet lookuponline regex cheatsheet lookupregex cheatsheet lookup online freebest regex cheatsheet lookupdeveloper toolweb development