Test regular expressions against text in real time. Matches highlight instantly as you type.
Enter your regex in the Pattern field (no surrounding slashes), paste your test string below it, and matches highlight instantly. Use the flag checkboxes to enable global matching (g), case-insensitive matching (i), or multiline mode (m). Captured groups are shown separately.
A regex tester lets you write a regular expression and immediately see which parts of your test text it matches. This is much faster than running code every time you adjust a pattern. The tester above highlights matches in real time as you type and shows each match's position and any captured groups.
g (global) finds all matches instead of stopping at the first. i makes matching case-insensitive. m makes ^ and $ match the start/end of each line. s (dotAll) makes . match newlines as well. In JavaScript, these map directly to the RegExp flags.
Parentheses in a regex create capture groups. For example, (\d{4})-(\d{2})-(\d{2}) on the string "2026-06-21" captures three groups: "2026", "06", and "21". Non-capturing groups use (?:...) syntax. Named groups use (?<name>...).