Skip to content
100% in your browser. Nothing you paste is uploaded — all processing runs locally. Read more →

Regex Tester

Type a pattern, see matches highlighted in your test text. Capture groups are listed below. JavaScript regex flavor — your browser's native RegExp.

/ /
🔒 100% client-side · uses your browser's native RegExp · no upload

Matches with capture groups

    Flag reference

    FlagMeaning
    gGlobal — find all matches, not just the first
    iIgnore case — A matches a
    mMultiline — ^ and $ match line boundaries
    sDotall — . matches newlines too
    uUnicode — strict Unicode mode, enables \\p{...}
    ySticky — match at exact lastIndex position

    How it differs from regex101

    regex101 is the long-standing champion in this space — it supports PCRE, Python, Java, .NET, Go, and other flavors. This tool is JavaScript-only by design (it uses your browser's native RegExp), which means:

    For most web/Node code, JS-native is what you want. For other languages, consult our flavor comparison.

    Common patterns

    PatternMatches
    \\b\\w+@\\w+\\.\\w+\\bSimple email (not RFC-compliant — see warning below)
    https?:\\/\\/\\S+HTTP / HTTPS URL
    \\b\\d{3}-\\d{2}-\\d{4}\\bUS Social Security number format
    \\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\bUUID
    ^\\s*$ (with m)Empty lines
    (?<year>\\d{4})-(?<month>\\d{2})-(?<day>\\d{2})ISO date with named groups

    Common pitfalls

    Try the related tools

    FAQ

    Which regex flavor does this use?

    Your browser's native ECMAScript regex (the same as new RegExp() in JavaScript). Most patterns work — but PCRE-specific features like (*FAIL), (?R) recursion, or balancing groups will not. See regex flavors for cross-language differences.

    How does match highlighting work?

    The pattern runs against the test text with a g flag. Each match is wrapped in a <mark> for visual highlight. Capture groups are listed below the result.

    Why does my regex match nothing?

    Most common causes: (1) missing g flag (only finds the first match), (2) special characters not escaped (. matches anything; \. matches a literal dot), (3) anchors (^ / $) without the m flag on multiline input, (4) typo in a character class.

    What's the safety cap on matches?

    Hard cap of 10,000 matches per run to prevent the page from freezing on pathological patterns. Only the first 50 are listed in detail below the editor; the count and highlights cover all.

    Is my regex / text sent anywhere?

    No. Both the pattern and the test text run through your browser's native RegExp constructor. Open DevTools → Network and verify — no requests are made.

    How do I do a multiline match?

    Tick the m flag — that makes ^ and $ match start/end of each line, not just the whole input. For matching a newline with ., also tick s (dotall).