Free regex tester with live highlighting. Test regular expressions against your text in real time, with a library of common patterns and a replace mode.
Type your regular expression pattern in the pattern field. Toggle flags like global (g), case-insensitive (i), or multiline (m) as needed.
Paste or type the text you want to test against in the test string area.
Matches are highlighted in real-time. See match count, positions, and captured groups below.
This tool uses JavaScript's built-in RegExp engine, which supports standard regex syntax including lookahead, lookbehind, named groups, and Unicode properties.
g (global) finds all matches, i (case-insensitive) ignores case, m (multiline) makes ^ and $ match line boundaries, s (dotAll) makes . match newlines.
Yes. Use parentheses () for capture groups and (?<name>) for named groups. Matched groups are displayed in the results.
Yes. Everything runs in your browser. No regex patterns or test strings are sent to any server.
This runs the JavaScript engine. Lookbehind support, named groups and some escapes differ between engines, so a pattern is not always portable.
With m, the anchors caret and dollar match at every line break instead of only at the very start and end of the text.
Refer to groups as $1, $2 and so on in the order they appear. $& inserts the whole match, and $$ gives a literal dollar sign.
Nested quantifiers such as (a+)+ can backtrack exponentially on input that nearly matches. Make the inner part more specific or anchor the pattern.
Replace text across a whole document at once, with whole word, case sensitive and regular expression options.
Open ToolFree online JSON formatter and validator. Format, minify and validate JSON with syntax highlighting and instant error detection.
Open ToolConvert text between uppercase, lowercase, title case, camelCase, snake_case, kebab-case, and more.
Open Tool