Regex tester
Test regular expressions against any text. Matches are highlighted in real time.
How the regex tester works
Regular expressions (regex) are patterns used to match, search, and manipulate text. This tester uses JavaScript's native RegExp constructor, making it directly compatible with any JavaScript code. Enter your pattern (without delimiters) and optional flags in the dedicated field.
Key flags: g (global — find all matches, not just first), i (case-insensitive), m (multiline — ^ and $ match line starts/ends), s (dotAll — . matches newlines too). Common patterns: \d+ matches one or more digits, \w+ matches word characters, ^ anchors to line start, $ to line end, [a-z] matches a character range, (group) captures a group. Matches are highlighted in the test string and all capture groups are shown. The tester is client-side — no input leaves your browser, making it safe to test patterns against sensitive data.