Regex Tester

Text & Code

Test and debug regular expressions in real time with capture groups, substitution, and flags.

//
Presets:
Test String
2 matches
Match 1 (index 20)
Match 2 (index 47)

Regular Expression Quick Cheat Sheet

\dAny digit [0-9]
\wWord char [a-zA-Z0-9_]
\sWhitespace (space, tab, newline)
^Start of line/string
$End of line/string
[abc]Any character in brackets
[^abc]Any character NOT in brackets
+1 or more occurrences
*0 or more occurrences
?0 or 1 occurrence (optional)
(?:...)Non-capturing group
(?<name>...)Named capture group

How to Use Regex Tester

  1. 1Step 1

    Enter your regular expression pattern and toggle desired flags (g, i, m, s, u).

  2. 2Step 2

    Type or paste your test text into the test string area to view live match highlighting.

  3. 3Step 3

    Explore the capture groups table or switch to Replace mode to test string substitutions.

  4. 4Step 4

    Share your regex test with team members using the auto-generated shareable URL.

Technical Specification & Client Security

Regular expression evaluation compiles and executes in-browser using JavaScript's native RegExp engine. Test strings and proprietary logs never leave your device, ensuring zero exposure of sensitive user data.

›100% Client-side execution without server round-trips
›Instant real-time output updates as you type
›One-click copy and clear buttons with verified confirmation toast
›Zero data telemetry or external network calls
›Accessible keyboard navigation and mobile-first responsive design
›Browser-native execution in local memory

Input & Output Transformation Examples

Email Address Extraction
Input:
Pattern: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Text: Reach us at [email protected] or [email protected]
Output:
2 Matches: '[email protected]', '[email protected]'
Named Group ISO Date Parsing
Input:
Pattern: (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})
Text: Release date: 2026-11-16
Output:
Match: 2026-11-16 | year: 2026, month: 11, day: 16

Frequently Asked Questions

Which regular expression engine is used?

The tester runs standard ECMAScript regular expressions via your browser's V8 or JavaScriptCore runtime, supporting modern features like named capture groups, lookbehinds, and Unicode property escapes.

How can I share a regex test with a coworker?

Click the Share button or copy the current browser URL. The pattern, flags, and test string are automatically synchronized into the URL query parameters.

Does this tool protect against catastrophic backtracking (ReDoS)?

Evaluation runs inside a safe execution sandbox. Highly nested recursive quantifiers are caught to prevent freezing your browser tab.

Related Developer Utilities