Regex Tester
Test JavaScript regular expressions live: highlighted matches, capture groups and a replace preview.
90 / 1,00,000 characters
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
| # | Match | Groups |
|---|---|---|
| 114–24 | 06/10/2026 |
|
| 230–40 | 05.11.2026 |
|
| 345–54 | 5-11-2026 |
|
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.