$ regex --test

regex tester.

Test regular expressions with real-time matching, group capture, and flags. 100% client-side.

input
pattern/\d{3}-\d{2}-\d{4}/gi
test string0 chars
matches
matches: 0
Enter a pattern and test string to see matches highlighted here.
The tool uses JavaScript regex syntax (ECMAScript), supporting flags like g (global), i (case-insensitive), m (multiline), and s (dotall).
Groups are defined with parentheses (). Each match's captured groups are shown below the test string. Named groups use (?<name>...) syntax.
test() returns true/false if a match exists. match() returns the matched string and groups. The tool uses match() with detailed highlighting.

learn more in our detailed guide.

→ read the guide