Regex Tester

Flags

Pattern: 1,000 characters; text: 20,000 characters. Tests time out after 1 second.

Test text

Matches

UTF-16 offsets
Help & FAQ

Test JavaScript regular expressions

For example, (\w+) finds words and records the first capture group. Enable g to find multiple matches.

What do the flags mean?

g finds all matches, i ignores case, m enables multiline anchors, s lets dot match newlines, and u enables Unicode mode.

Why can a test time out?

Some expressions can take a long time to execute. The test runs in a separate worker that is stopped after one second; simplify the expression or shorten the text if it times out.

Related tool: JSON Formatter