DevToolRoomLocal-first developer utility
Home / Regex Tester

Regular Expression Tester

Test a JavaScript regular expression against sample text, inspect matches and check flags before adding a pattern to your code.

JavaScript syntax

Patterns use the regular expression syntax supported by your browser's JavaScript engine.

Flags

Try common flags such as g for global, i for case-insensitive and m for multiline matching.

Fast local checks

Matches are computed in the page, which is useful for quick debugging and sample data.

Frequently asked questions

Why is my pattern invalid?

Check escaping, brackets, parentheses and flags. The tool shows the browser's parsing error.

Does this support every regex flavor?

No. This page tests JavaScript regular expressions. PCRE, Python and other engines have different features.