ToolHub

Regex Tester

Test and debug regular expressions online with syntax highlighting and explanations.

Regex Tester

/ /
Matches
Enter a test string to see matches.

About Regex Tester

Test and debug regular expressions against your own text in real time. See matches highlighted as you type, use capture groups, and toggle flags like global, case-insensitive, and multiline.

How to Use

  1. Enter your regular expression pattern.
  2. Set the flags you need (g, i, m, s).
  3. Paste the text to test against.
  4. See matches highlighted and inspect capture groups.

Why Use This Tool?

Frequently Asked Questions

What do the regex flags g, i, m, and s mean?

g = global (find all matches, not just the first), i = case-insensitive, m = multiline (^ and $ match line starts/ends), and s = dotall (. also matches newlines).

What is a capture group?

Parentheses ( ) create a capture group that extracts part of a match. For example, (\d{4})-(\d{2}) captures a year and month separately so you can reuse them.

Which regex flavour does this use?

It uses the JavaScript (ECMAScript) regex engine built into your browser, so patterns behave exactly as they would in JS code.

Related tools