WordRoom Privacy

Developer

Regex Tester

Write a JavaScript regex, test it against your text, and inspect every match and capture group instantly.

Common questions

How do I write a regular expression in JavaScript?

Write your pattern between slashes: /pattern/. Add flags after the closing slash: g for global (all matches), i for case-insensitive, m for multiline. The tester shows matches and capture groups in real time.

What are capture groups?

Parentheses in a regex create capture groups, which extract parts of a match. For example, /(\d{4})-(\d{2})-(\d{2})/ captures the year, month and date from a date string. The tester lists each group with its matched text.

Why does my regex not match?

Common causes: forgetting the global flag when you want all matches, using . instead of a character class when you need a literal dot, or not escaping special characters like ( ) [ ] { } + * ? ^ $ . The tester shows the error message from the JavaScript engine.