About This Tool

What is Probador de Expresiones Regulares?

A tool for testing regular expressions with real-time matching against test strings. Used for debugging and developing regex patterns for string searching, validation, and text parsing in development workflows.

How to Use

  1. Enter your regex pattern in the top input field.
  2. Enter the test string in the area below.
  3. Matching portions are highlighted in real-time.
  4. Configure flags (case insensitive, multiline, etc.) to adjust matching behavior.

Key Features

  • Real-time regex matching with highlighting
  • Case insensitive, multiline, and dotAll flags
  • Detailed match text, position, and capture group display
  • ECMAScript, RE2, and PCRE2 engine selection

Tips

  • For email validation, use standardized regex patterns rather than simple ones.
  • Capture groups () allow you to extract specific matched portions.
  • Using the ? quantifier performs lazy (non-greedy) matching instead of the default greedy matching.

Probador de Expresiones Regulares

Prueba expresiones regulares con coincidencias en tiempo real

//g

Frequently Asked Questions

¿Cuál es la diferencia entre los motores ECMAScript, RE2 y PCRE2?

ECMAScript es el motor regex estándar de JavaScript. RE2 (usado por Go, Google) es más rápido y garantiza tiempo lineal, pero carece de referencias hacia atrás y lookahead. PCRE2 (usado por PHP, Nginx) es el más completo, soportando recursión, patrones condicionales y más.

¿Qué hace la bandera 'g' (global) y cuándo debo usarla?

Sin la bandera 'g', una regex se detiene tras la primera coincidencia. Con 'g', encuentra todas las coincidencias. Usa 'g' cuando necesites encontrar o reemplazar todas las ocurrencias. Nota: en JavaScript, usar 'g' con test() puede producir resultados inconsistentes por el estado de lastIndex.

¿Cómo coincido texto a través de múltiples líneas?

Por defecto, ^ y $ coinciden con el inicio/final de toda la cadena, y . no coincide con saltos de línea. Activa la bandera 'm' (multiline) para que ^ y $ coincidan con límites de línea. Activa la bandera 's' (dotAll) para que . coincida también con caracteres de nueva línea.


Related Tools