ToolHub

Regex Tester

Test, debug, and learn regular expressions

//g

Flags

Highlighted matches 3 matches

Send an email to hello@toolhub.buzz or contact@example.com to get in touch.
We also support reports@example.org for issues.

Match details

#1hello@toolhub.buzzat index 17
#2contact@example.comat index 39
#3reports@example.orgat index 92

Common patterns

Quick steps

1

Write your pattern

Drop a regular expression into the pattern field. Common syntax: \d for digit, \w for word char, .* for any.

2

Pick flags

g for all matches, i for case-insensitive, m for multiline. Click flags to toggle.

3

Test against text

Paste any text into the test string. Matches highlight live with capture groups shown below.

Frequently asked questions

Which regex engine is this?

JavaScript's built-in RegExp engine (the same one in your browser). It supports most common features but lacks some advanced PCRE features like atomic groups.

How many matches will it show?

Up to 100 matches are displayed in detail. The highlighted preview shows all matches. Very large match counts are truncated to keep the page responsive.

How do I write a regex that matches a literal special character?

Escape it with a backslash. For example, \. matches a literal dot, \( matches a literal opening parenthesis.

Is my pattern or test text uploaded anywhere?

No. Everything runs in your browser. Open developer tools to verify zero outbound requests carry your data.