All tools

Regex Tester

Test regular expressions with live match highlighting and group capture.

//g
Flags:
7 matches
Hello world! Testing 123 regex patterns here.
#1Hello0–5
Group 1: Hello
#2world6–11
Group 1: world
#3Testing13–20
Group 1: Testing
#412321–24
Group 1: 123
#5regex25–30
Group 1: regex
#6patterns31–39
Group 1: patterns
#7here40–44
Group 1: here

JavaScript regex flags

FlagNameEffect
gGlobalFind all matches, not just the first
iCase insensitiveMatch A and a as the same character
mMultiline^ and $ match start/end of each line
sDot-all. matches \n and \r as well
uUnicodeTreat pattern and string as Unicode code points

Frequently asked questions

Which regex engine does this use?

It uses your browser's native JavaScript RegExpengine — the same one used in Node.js and any JS runtime. Results are identical to what you'd get running the same regex in code.

How do I match a literal dot or parenthesis?

Escape special characters with a backslash. In the pattern field, \. matches a literal dot, \( a literal open parenthesis, and so on. The special characters that need escaping are: . * + ? ^ $ [ ] | ( ) { } \

What are capturing groups?

Parentheses in a pattern create capturing groups. For example, (\d+)-(\w+) has two groups. Each match shows the full match and then each group's value. Use (?:...) for a non-capturing group that groups without creating a capture.

Page share preview

More free image tools