RANA
Real-Time Regular Expression Debugger

Online Regex Tester & Match Debugger

Validate, test, and debug ECMAScript regular expressions in real-time. Inspect capture groups, match indices, and modifiers with zero network latency.

0Total Matches
0Capture Groups
0.0msEngine Time
IdleSyntax Status
||
//gm
Flags:
Highlighted MatchesLive DOM Rendering
Enter a regular expression pattern above...
Match Table & Captured Groups
#Matched ValueIndex RangeCaptures
No matches found yet. Type a pattern and test payload above.

Understanding Regular Expressions (Regex)

A regular expression is a specialized sequence of characters defining a search pattern. Commonly utilized in algorithms for string searching, input sanitization, lexical parsing, and text transformations, regular expressions provide high-speed validation for complex strings like email addresses, URLs, IP addresses, and dates.

Capture Groups & Tokens

Parentheses (...) establish sub-patterns known as capture groups. This permits parsing individual sections of matched strings (such as domain extensions or phone area codes) directly into discrete variables.

Execution Modifiers (Flags)

Flags alter the parsing behavior of regular expressions. Setting the global flag (g) ensures the engine matches all occurrences rather than halting at the first, while m adjusts anchor points to match per line.

Common Regex Metacharacters & Tokens

TokenDescriptionExample Match
\dMatches any single digit (equivalent to [0-9])"5" in "Room 5"
\wMatches any alphanumeric character or underscore ([a-zA-Z0-9_])"a", "9", "_"
\sMatches any whitespace character (space, tab, newline)" " or "\t"
^ and $Anchors matching to the start (^) and end ($) of the string or line^Hello$
+ and *Quantifiers: (+) matches 1 or more times; (*) matches 0 or more timesa+ matches "aaa"

Frequently Asked Questions

Which regex flavor does this online tester use?

This tool executes directly within your browser using JavaScript's native RegExp engine (ECMAScript flavor), supporting modern features like named capture groups, lookaheads, and lookbehinds.

What do the regex flags (g, i, m, s) do?

g finds all matches instead of stopping after the first; i ignores case sensitivity; m treats start (^) and end ($) anchors across each line; and s (dotAll) allows the dot (.) to match newline characters.

Is my test data or pattern sent to any backend server?

No. All regular expression parsing, execution, and DOM highlighting happen 100% locally in your browser's JavaScript engine. No data ever leaves your computer.