Regex Tester & Debugger
Forge / Regex Tester

Regex Tester & Debugger

Write a regular expression and see live match highlighting, capture groups, plus replace and split modes. Powered by your browser's native JavaScript engine.

⚑ Instant resultsπŸ”’ 100% privateβœ“ Always free

Pattern

/
Flags
Mode

Test string

0 chars

Result

β€”

Common patterns

Click to load

Frequently asked questions

Which regex flavor is this?

Your browser's ECMAScript engine β€” the same used by Node.js and modern browsers. Lookbehind, named groups ((?<name>…)), and Unicode property escapes are supported in current engines.

How are capture groups shown?

In Match mode every match lists its numbered and named groups with the captured text and position, so you can verify exactly what each part matched.

Is my text uploaded?

No. Evaluation is entirely local. No pattern or test string leaves your device.

Related tools

About this tool

This free online tool runs entirely in your browser. Your data never leaves your device β€” there is no server processing, no tracking, and no signup required. Use it as often as you need, on any device.

Β·

How This Calculator Works

This tool tests regular expressions using the browser's native ECMAScript RegExp engine (ECMA-262 Β§21.2). JavaScript uses a slightly different regex flavor than PCRE (Perl Compatible Regular Expressions) β€” for example, JavaScript does not support lookbehind assertions in older engines, named capture groups were added in ES2018, and the s (dotAll) flag in ES2018. All testing is performed client-side.

Frequently Asked Questions

What is the difference between JavaScript and PCRE regex?

JavaScript's RegExp (ECMA-262) lacks some PCRE features: no possessive quantifiers, no atomic groups, and Unicode property classes (\p{...}) require the 'u' flag (ES2018). Lookbehind (?<=...) was added in ES2018 but is not supported in all browsers. Named groups use (?...) syntax.

What do the regex flags mean?

g = global (find all matches, not just the first), i = case-insensitive, m = multiline (^ and $ match line boundaries), s = dotAll (. matches newlines, ES2018), u = unicode (treats patterns as Unicode code points), y = sticky (match from lastIndex only).

How do I capture groups in regex?

Use parentheses to capture: (\d{4}) captures a 4-digit number. Reference captured groups with $1, $2 in replacements or match[1], match[2] in JavaScript. Use (?:...) for non-capturing groups. Named groups (?\d{4}) are accessible via match.groups.year.

Sources & References

Explore more free tools

All calculators are free, private, and work instantly β€” no signup, no data collection.

Browse all tools →