Advertisement

Regex Tester

Test and debug regular expressions in real time. Enter a pattern and test string to see live match highlighting, capture groups, and a replace preview.

Flags:
Match Highlight
# Match Index Length

Run a pattern to see matches here.

'What do the regex flags do?', 'answer' => 'The g (global) flag finds all matches instead of stopping at the first. The i (case-insensitive) flag makes the match ignore uppercase/lowercase. The m (multiline) flag makes ^ and $ match the start/end of each line. The s (dot-all) flag makes the dot (.) also match newline characters.'], ]" />

Related Calculators