Skip to content
DeveloperPK

Regex Tester

Test regular expressions with highlighted matches and capture groups.

Flags

Matches highlighted (3 found)

Invoices were sent on 2026-11-05 and 2026-12-01.
The next one is due 2027-01-15.
#MatchPositionGroups
12026-11-0522
  • $1: 2026
  • $2: 11
  • $3: 05
22026-12-0137
  • $1: 2026
  • $2: 12
  • $3: 01
32027-01-1569
  • $1: 2027
  • $2: 01
  • $3: 15

How to use the Regex Tester

  1. 1

    Type your regular expression between the slashes, without the slashes themselves.

  2. 2

    Tick the flags you need, such as g for all matches or i to ignore case.

  3. 3

    Paste the text to test. Matches are highlighted as you type.

  4. 4

    Check the table for each match’s position and capture groups.

About this tool

Regular expressions describe patterns in text: dates, phone numbers, email addresses, or anything you need to find, validate or replace. They are powerful but easy to get subtly wrong, so testing against real examples saves time.

This tester uses your browser’s own JavaScript engine, so a pattern behaves here exactly as it will in JavaScript and TypeScript code. Most patterns also work the same in PHP, Python and other languages, apart from a few advanced features.

Capture groups in parentheses are listed for every match as $1, $2 and so on, and named groups such as (?<year>\d{4}) are shown by name.

Frequently Asked Questions

Which regex flavour does this use?

JavaScript (ECMAScript), as built into your browser. It supports lookbehind, named groups and Unicode property escapes.

Why does only one match show?

Without the g (global) flag a regular expression stops after the first match. Tick g to find them all.

How do I match a literal dot or bracket?

Escape it with a backslash: \. matches a dot and \( matches an opening bracket.

Is my text sent anywhere?

No. Matching runs in your browser.

Related Developer tools

Regex Tester: Test Regular Expressions Online | DeveloperPK