Regex Tester — Test Regular Expressions Online Free
/
/
Flags: g (global) · i (ignore case) · m (multiline) · s (dotAll)
Matches: 0
Enter a regular expression pattern and optional flags, then paste your test string below. Matches highlight in real time as you type — no page reload, no server, no signup. Supports all JavaScript RegExp flags: g, i, m, and s.
How it works
- 1 Enter a pattern Type your regular expression in the pattern field (without the surrounding slashes). For example: \b\w+@\w+\.\w+ to match email addresses.
- 2 Set flags (optional) Type one or more flags in the flags field: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line starts/ends), s (dotAll — dot matches newlines).
- 3 Paste your test string Type or paste the text you want to test. Matches are highlighted immediately, and the match list below shows each match with its position in the string.
Your data stays private
All processing happens entirely in your browser. No files, text, or data are ever sent to our servers. You can disconnect from the internet and this tool will still work.
Frequently asked questions
- What regex dialect does this tool use?
- It uses JavaScript's built-in RegExp engine, which follows the ECMAScript specification. Patterns work the same as in Node.js, Chrome, Firefox, and Safari.
- Does the tool always find all matches?
- Yes. The tool internally uses the global flag (g) to find every match, regardless of whether you include g in the flags field. Named capture groups work too.
- What do the flags mean?
- g = find all matches (global); i = ignore case; m = multiline (^ and $ match line boundaries); s = dotAll (the dot . matches newlines). You can combine them: gi, im, gis, and so on.
- Why does my regex match nothing?
- Common causes: the pattern is case-sensitive and the text has different casing (add the i flag); anchors like ^ or $ don't match across lines without the m flag; special characters like . + * ? need escaping with a backslash if you mean them literally.
- Does this tool support named capture groups?
- Yes. Use (?<name>pattern) syntax for named groups. The match details section shows the captured group names and values alongside each match.