Saltar al contenido principal
Z

What is Regular expression?

A regular expression (regex) is a pattern that describes a set of strings, used to search, match, validate and replace text. Built from literal characters and special metacharacters (like . * + ? [ ] ( )), it is supported by virtually every programming language and text editor.

Regex combines literals with metacharacters: . matches any character, */+/? are quantifiers, [...] is a character class, ( ) groups, and ^/$ anchor to start/end. For example ^\d{3}-\d{4}$ matches a 7-digit phone number.

Regexes power form validation (emails, URLs), search-and-replace, log parsing and tokenizing — but complex patterns can be hard to read, so keep them documented.

Regular expression tools

Preguntas frecuentes

¿Qué versión de XPath se admite?

XPath 1.0 — la versión que los navegadores admiten de forma nativa. Las características de XPath 2.0/3.0 (expresiones regulares, secuencias, tipos de datos) todavía no están disponibles.

¿Por qué mi consulta sobre HTML no devuelve ningún resultado?

El modo HTML envuelve tu código en <code class="font-mono">html/body</code>. Ajusta tu expresión en consecuencia (por ejemplo: <code class="font-mono">//body//div</code>).

¿Herramientas relacionadas?

<a class="text-brand-600 hover:underline" href="/jsonpath-tester">JSONPath Tester</a> para consultar JSON; <a class="text-brand-600 hover:underline" href="/xml-formatter">XML Formatter</a> para limpiar el XML de antemano.