# Regex Tester

> Test JavaScript regular expressions online with live match highlighting, capture groups, match index, i/m/s flags and 12 ready-made regex presets.

- Page: https://mondaytool.com/tools/regex-tester
- Category: developer-tools
- Price: free, no sign-up. Most tools run in the browser, so input is not uploaded.
- Use it: open https://mondaytool.com/tools/regex-tester. It is an interactive web page; this file is its documentation.

Last updated: 13 October 2026

## Test regular expressions as you type

This **regex tester** runs your pattern against sample text and highlights every match instantly. It uses your browser's JavaScript regular expression engine, so results match what `new RegExp()` does in JavaScript. Syntax from other languages (PCRE, Python) may behave differently.

## How to use it

1. Type a pattern between the slashes — no need to escape the slashes yourself.
2. Toggle flags: **g** (global), **i** (case-insensitive), **m** (multiline) and **s** (dotAll).
3. Paste your test string. Matches are highlighted and counted, with the number of unique matches.
4. Check the match table for each match's position (index), full text and capture groups. The first 20 matches are listed.
5. Click **Copy /{pattern}/flags** to copy it as a regex literal.

If the pattern is invalid, the browser's error message is shown under the input. Presets are included for email, URL, IPv4, phone, MM/DD/YYYY date, hex colour, HTML tags, JWT, UUID, credit-card-style numbers and Markdown bold and links.

## Worked example

Pattern `(\w+)@(\w+\.\w+)` on *Email me at alice@example.com or bob@company.org* gives 2 matches:

| # | Full match | Group 1 | Group 2 |
| --- | --- | --- | --- |
| 1 | alice@example.com | alice | example.com |
| 2 | bob@company.org | bob | company.org |

## Quick regex cheat sheet

- `\d` digit, `\w` letter/digit/underscore, `\s` whitespace, `.` any character.
- `+` one or more, `*` zero or more, `?` optional, `{2,4}` 2 to 4 times.
- `^` and `$` start and end (of each line with the m flag).
- `( )` capture group, `(?: )` group without capturing, `[abc]` any one of a, b or c.

## Frequently asked questions

### Does the g flag change the results here?

The tester always finds every match so you can see them all. The g flag is still included in the copied pattern, where it matters in your code.

### Are the presets perfect validators?

No. They are practical starting points — for example, the IPv4 preset also accepts 999.1.1.1. Test them against your own data.
