Regex Tester

Runs in your browserDeveloper Tools#Regex#Search

Test JavaScript regular expressions live: highlighted matches, capture groups and a replace preview.

Flags

90 / 1,00,000 characters

Matches3 matches
Invoice dated 06/10/2026, due 05.11.2026 (or 5-11-2026).
Not dates: 32/01/2026, 12/13/2026

Match detailsEach match with its position and capture groups

#MatchGroups
114–2406/10/2026
  • 1 day06
  • 2 month10
  • 3 year2026
230–4005.11.2026
  • 1 day05
  • 2 month11
  • 3 year2026
345–545-11-2026
  • 1 day5
  • 2 month11
  • 3 year2026
How to use, limits & privacy

About Regex Tester

Test JavaScript regular expressions on your own text and see every match highlighted as you type. Each match is listed with its position and its numbered and named capture groups, so it also works as a regex visualizer for groups. The Replace tab previews a replacement with $1 or $<name>, and ready-made patterns cover email addresses, links, Indian mobile numbers, PIN codes, PAN, IFSC, GSTIN and dates. It runs in your browser and is useful for developers, students learning regex and anyone cleaning up data.

How to Use

1

Enter a pattern

Type a regular expression in the Regular expression box, or pick one from Common patterns. You can also paste a literal such as /\d+/g and the flags are set for you.

2

Choose flags and add text

Turn flags such as g (global), i (ignore case) or m (multiline) on or off, then paste your text into Test text. Matches are highlighted at once.

3

Check groups or replace

Match details lists each match with its groups. Switch to Replace, type a replacement such as $<year>-$<month>-$<day>, and copy the result.

Privacy & Processing

  • Mode: local
  • Files Leave Browser: Local tool processing; review details below
  • Max Input Size: Device memory limits
  • Account Required: No
  • Data Stored Locally: Nothing is saved; the pattern and text are cleared when you close the page.
  • Network Processing: Assets or models may require an initial download

Your pattern and text are processed in your browser only. Nothing is uploaded.

Rules & Limitations

  • Uses your browser's JavaScript regex engine, not PCRE, Python or Java: (?P<name>…), \A, \Z, atomic groups and possessive quantifiers are not supported.
  • Up to 100,000 characters of text and 2,000 characters of pattern. Only the first 10,000 matches are listed.
  • A pattern that runs longer than 1 second is stopped, usually because of nested repeats like (a+)+.
  • The d and v flags need a recent browser; they are disabled where your browser lacks them.
  • The ready-made patterns check the format only. They can't tell whether a PAN, GSTIN or phone number really exists.

Top Suggestions

  • Writing a validation pattern for a form field such as a PIN code or mobile number
  • Pulling email addresses or links out of a long text
  • Converting dates from DD/MM/YYYY to YYYY-MM-DD with a replacement
  • Checking what each capture group returns before using it in code
  • Learning regex with the cheat sheet and live highlights

Regex Tester FAQ

How do I test a regular expression online?

Type the pattern in the Regular expression box and paste your text into Test text. Every match is highlighted straight away, and Match details lists each one with its position and capture groups.

Is my text uploaded anywhere?

No. The pattern runs in a background worker inside your browser, and nothing is sent to a server or saved. Closing the page clears it.

What is the regex for an Indian mobile number?

Pick Indian mobile number in Common patterns. It matches 10 digits starting with 6, 7, 8 or 9, with an optional +91, 91 or 0 in front and an optional space or hyphen after the first five digits, such as +91 98765 43210.

How do I use capture groups in a replacement?

Open the Replace tab. $1 inserts the first group, $<name> a named group, $& the whole match and $$ a dollar sign. For example, the date pattern with $<year>-$<month>-$<day> turns 06/10/2026 into 2026-10-06.

Why does my regex freeze or get stopped?

Patterns with nested repeats, such as (a+)+ or (.*)*, can try millions of combinations on text that almost matches. The tester stops any run after 1 second; rewrite the pattern so each part can match in only one way.

What is the difference between this and a regex visualizer?

A regex visualizer usually shows what a pattern matches and what each group captures. This tester does that with highlights and a per-match group list. It does not draw a railroad diagram of the pattern.