RegEx Sandbox

Test regex patterns and see them explained plain-English

//g

Test String

Highlighted Matches (3)

Call 555-123-4567 or 555-987-6543 to reach support. The fax line, 555-000-0000, is unattended.

Matches

  1. #1 @5 555-123-4567

    • Group 1: 555
    • Group 2: 123
    • Group 3: 4567
  2. #2 @21 555-987-6543

    • Group 1: 555
    • Group 2: 987
    • Group 3: 6543
  3. #3 @66 555-000-0000

    • Group 1: 555
    • Group 2: 000
    • Group 3: 0000

Explanation

  • gfind all matches, not just the first
  1. (\d{3})capturing group #1
    1. \da digit (0-9)exactly 3 times
  2. -the character "-"
  3. (\d{3})capturing group #2
    1. \da digit (0-9)exactly 3 times
  4. -the character "-"
  5. (\d{4})capturing group #3
    1. \da digit (0-9)exactly 4 times

A regex sandbox for the moment a pattern isn't doing what you expect. Type a pattern and test text and see matches highlighted live, every capture group broken out per match, and — the part most testers skip — a plain-English, piece-by-piece explanation of what the pattern actually says, so you're not just staring at a wall of slashes and backslashes.

Is my pattern or test text sent anywhere?
No. Matching runs locally using the browser's native RegExp engine, and the explanation is generated by parsing the pattern text in JavaScript — nothing you type is ever uploaded.
Which regex flags are supported?
g (global), i (case-insensitive), m (multiline), s (dotAll), u (Unicode), and y (sticky) — toggle them as buttons next to the pattern field and matching updates immediately.
How does the plain-English explanation work?
The pattern is parsed into its constituent pieces — anchors, character classes, groups, quantifiers, lookaround — and each piece is rendered as a short description, nested to mirror how groups and alternation are structured in the pattern itself.
Why does a capture group show "(no match)"?
A group inside an alternation or an optional quantifier (like (?:...)? ) can match zero times even when the overall pattern matches. When that happens the group's captured value is undefined, which is shown as "(no match)" instead of an empty string.