RegEx Tester & Explainer

An interactive developer utility by Aethvion Labs

Write and test regular expressions in real-time. View highlighted matches, hover to inspect capture groups, read a step-by-step plain English breakdown of your pattern, and use our quick cheat sheet.

Regular Expression

/ /
gm
No syntax errors.

Test String

0 characters

Regex Explanation

A breakdown of how the browser evaluates your pattern:

Match Details

0 matches
No matches found. Check your pattern or string.

Quick Cheat Sheet

💡 Click any item above to append it to your pattern.

Regular Expressions (RegEx) Guide

A Regular Expression is a sequence of characters that forms a search pattern. They are extremely useful for text validations (such as verifying emails or telephone formats), string parsing, and complex text replacements. Because regex syntax is dense and compact, visual testing and token explanations are essential toolsets for developer productivity.

Regex Modes Explained

  • Global (/g): Normally, a regular expression stops matching after finding the first occurrence. The global flag tells the regex engine to continue searching and retrieve all matching segments across the entire text.
  • Case Insensitive (/i): Strips case differentiation, meaning [a-z] will match uppercase characters (A-Z) and lowercase characters (a-z) alike.
  • Multiline (/m): Changes the behavior of start-of-string anchor (^) and end-of-string anchor ($) so that they match the beginning and end of individual lines within a multi-line string, instead of matching only the absolute start and end of the entire text body.
  • dotAll (/s): Standard regex dot token (.) matches any single character *except* newlines. Toggling dotAll allows the dot token to match newlines as well, which is helpful when parsing paragraphs.