Tools › Text & Data › Regex Tester
๐Ÿงช

Regular Expression Tester

Write a pattern, pick flags, and see every match, capture group and replacement result update as you type.

How it works

This tester uses your browser's own JavaScript regular expression engine, so results match what you will get in Node.js and front-end code. Common building blocks: \d digits, \w word characters, \s whitespace, . any character, + one or more, * zero or more, ? optional, ( ) capture group, (?: ) non-capturing group, [a-z] character class, ^ and $ anchors.

Flags: g find all matches, i ignore case, m multiline anchors, s dot matches newline, u full Unicode.

Frequently asked questions

Why does my regex only find one match?

You need the g (global) flag to find all matches.

Does this support lookbehind and named groups?

Yes, in any modern browser. Named groups use (?<name>...) and lookbehind uses (?<=...) or (?<!...).

Why is my regex slow or freezing?

Nested quantifiers such as (a+)+ can cause catastrophic backtracking. Make the pattern more specific.

More tools

{ } JSON Formatter & Validator๐Ÿ“Š CSV to JSON Converter๐Ÿ†š Text Diff Checker๐Ÿ”ค Base64 Encode / Decode๐Ÿ”— URL Encode / Decode๐Ÿ”  Case Converter๐Ÿ“ Word & Character Counter๐Ÿ”ข Number Base Converter๐ŸŒ URL Slug Generatorโ†•๏ธ Sort & Deduplicate Lines๐Ÿ”ก Text to Hex / Binary Converter๐Ÿท๏ธ HTML Entity Encoder / DecoderAll Text & Data tools →
Copied to clipboard