Regex Tester lets you write a regular expression with configurable flags (g, i, m, s) and test it against a string. Matches are highlighted live in the test string, and a match list shows each match with its index and capture groups. Invalid patterns show a clear error message.
6 matches
JavaScript (ECMAScript) regex syntax is used, the standard for browsers and Node.js. It supports groups, lookaheads, lookbehinds, character classes, and quantifiers.
Yes. Enable the 'm' flag to make ^ and $ match at line boundaries instead of only the start/end of the whole string, and the 's' (dotAll) flag to make '.' match newline characters too.
The global flag (g) makes the regex find all matches in the test string instead of stopping after the first one. Without it, only the first match is shown.
Each match in the match list shows its overall matched text along with the value of each capture group, indexed in the order the groups appear in the pattern.
Common causes are unescaped special characters (like an unmatched parenthesis or bracket) or using a flag combination that's invalid in JavaScript. The error message describes what JavaScript's RegExp constructor rejected.
Yes. JavaScript's (?<name>...) named capture group syntax is supported, and named groups appear alongside numbered groups in the match details.
Yes — since the tool uses the same JavaScript regex engine as browsers and Node.js, a pattern that works here will behave the same way in your code.