Regex Tester
Test regular expressions against text — runs entirely in your browser.
//gi
Matches4 matches
[1] "Hello" at index 0
[2] "World" at index 6
[3] "hello" at index 13
[4] "world" at index 19
Cheat sheet
Anchors
Quantifiers
Groups
Character classes
Flags
Test regular expressions against a string and see all matches, groups, and indices instantly. Runs entirely in your browser.
Frequently asked questions
- What is a regular expression?
- A regular expression (regex) is a sequence of characters that defines a search pattern. Regex is used in programming to find, extract, and replace text that matches a specified pattern.
- What regex flavour does this tester use?
- This tester uses JavaScript's built-in RegExp engine, which supports standard features like character classes, quantifiers, lookaheads, and named capture groups (ES2018+).
- What do the g, i, m, s flags do?
- g (global) finds all matches instead of stopping at the first. i (case-insensitive) ignores letter case. m (multiline) makes ^ and $ match the start and end of each line. s (dotAll) makes . match newline characters too.