Probador de Regex

Prueba y valida expresiones regulares en tiempo real. Visualiza todas las coincidencias encontradas.

Flags Comunes

  • g - Global: busca todas las coincidencias
  • i - Case insensitive: ignora mayúsculas/minúsculas
  • m - Multiline: ^ y $ coinciden con inicio/fin de línea
  • s - Dotall: . coincide con saltos de línea

Common Flags

The regex (regular expression) tester is an indispensable tool for developers that allows testing and validating search patterns in real-time. Regular expressions are text patterns used to search, replace, and validate strings according to specific rules. This tool facilitates debugging complex regex by visualizing all matches found in the test text, their position, and captured groups. It supports common flags like global (g), case insensitive (i), multiline (m), and dotall (s), which modify pattern behavior. It's especially useful when developing form validations, text parsers, or any application requiring pattern-based text processing. The tool processes everything locally in your browser using the native JavaScript RegExp API, ensuring that sensitive data is never sent to external servers.

Use cases

  • Develop and debug regular expressions for validations
  • Test search and replace patterns in text
  • Validate email, phone, URL, and other data formats
  • Extract specific information from logs or text documents

Frequently asked questions

What are regex flags and what do they do?
Flags modify pattern behavior: 'g' (global) finds all matches, 'i' (insensitive) ignores case, 'm' (multiline) makes ^ and $ match line start/end, and 's' (dotall) makes . match newlines.
How do I visualize captured groups in the regex?
The tester shows all matches found and their captured groups in parentheses. For example, in /(\d{3})-(\d{3})/, group 1 captures the first 3 digits and group 2 the next 3.
Can I test regex for different programming languages?
This tool uses JavaScript regex syntax (similar to PCRE). Most languages use similar syntax, but may have minor differences. Check your language's specific documentation.
What happens if my regex has syntax errors?
If the regex has syntax errors (unclosed parentheses, invalid characters, etc.), the tool will show an error message indicating the problem to facilitate correction.

Related tools