Live Real-Time Pattern Evaluation
Watch matches highlight instantly as you type every token or quantifier, complete with helpful error callouts for unmatched brackets or malformed quantifiers.
Free online Regex Tester and Debugger. Test RegExp patterns with instant match highlighting, capture group analysis, flag controls (g, i, m, s, u), and cheat sheet presets.
A developer needs to parse incoming email sender addresses like `[email protected]` and extract both the local user and domain segments.
| Regex Pattern | ([a-zA-Z0-9._%+-]+)@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,}) |
| Flags | g (Global Match) |
| Captured Group 1 (User) | "contact" |
| Captured Group 2 (Domain) | "support.usefulgo.com" |
💡 Capture groups segment complex matched strings cleanly, allowing effortless extraction into backend variables or database columns.
Enter your regular expression pattern between the slashes (/ ... /) and toggle desired flags (g: global, i: ignore case, m: multiline, s: dotAll, u: unicode).
Type or paste your test text into the test area to see matched strings highlighted in real time.
Inspect match details below the editor for exact indices, length, and numbered capture groups, or switch to the Replace tab to test string substitution.
Watch matches highlight instantly as you type every token or quantifier, complete with helpful error callouts for unmatched brackets or malformed quantifiers.
Inspect the full match value along with individual numbered and named capture groups, exact start/end character offsets, and total match counters.
Quickly load vetted regex patterns for emails, URLs, IPv4/IPv6 addresses, phone numbers, UUIDs, dates, and alphanumeric slugs with one click.
Working with scheduled automation and regex log filters? Check out the Translate crontab schedules to English.
Need to structure extracted regex data into JSON? Use the Format and validate JSON payloads.
Comparing before-and-after string substitutions? Try the Compare text and regex outputs.
Validating and parsing URL query components? Use the Encode URL and URI strings.
Quick reference guide for commonly used regular expression characters and symbols.
| Token | Name | Description / Meaning | Example |
|---|---|---|---|
| ^ | Caret | Matches beginning of string (or line in multiline mode) | ^Hello |
| $ | Dollar | Matches end of string (or line in multiline mode) | world$ |
| . | Dot / Wildcard | Matches any single character except newline | a.c matches "abc" |
| * | Star | Matches 0 or more occurrences of preceding item | ab* matches "a", "ab", "abb" |
| + | Plus | Matches 1 or more occurrences of preceding item | ab+ matches "ab", "abb" |
| ? | Question Mark | Matches 0 or 1 occurrence (optional) | colou?r matches "color" or "colour" |
| \d | Digit | Matches any ASCII numeral equivalent to [0-9] | \d{4} matches "2026" |
| \w | Word Character | Matches alphanumeric characters and underscore [a-zA-Z0-9_] | \w+ |
| \s | Whitespace | Matches space, tab, newline, or form feed | \s+ |
Special metacharacters like . * + ? ^ $ ( ) [ ] { } | \ must be escaped with a backslash (\) when matching literally.
Without the "g" flag, a regular expression stops after discovering the first match. The "g" flag instructs the regex engine to continue scanning the entire input text and find all matches.
Capture groups (...) store matched substrings in memory so they can be referenced as $1, $2 or in match arrays. Non-capturing groups (?:...) apply quantifiers or alternation without storing the result, improving matching performance.
By default, the dot (.) wildcard matches any character except line break terminators (\n, \r). Enabling the "s" flag allows the dot to match newline characters as well.
Yes. All pattern compilation, matching, and replacement execute directly in your browser using standard JavaScript ECMAScript RegExp mechanics.
Developer Tools
Translate crontab schedule expressions into human-readable English, preview upcoming execution dates, and generate cron expressions interactively.
Format, beautify, validate, and minify JSON data online with instant syntax error highlighting and tree inspection.
Compare two text snippets or code blocks side-by-side with highlighted character and line differences.
Encode or decode URL components and query strings with percent encoding.
Generate secure, cryptographically random Version 4 (v4) and time-ordered Version 7 (v7) UUIDs and GUIDs with custom formatting, bulk batch generation, and live inspection.
Explore, navigate, and inspect complex JSON payloads with an interactive collapsible tree viewer, type badges, node search, and JSON path copying.