This uses JavaScript regular-expression syntax. Pathological patterns can take a long time on large text, so input size is limited.
How to use this regex tester
- Enter a pattern and flags.
- Paste the text to test.
- Review matches, positions and groups.
What regex flavor does this tester use?
This tester uses the JavaScript RegExp engine built into the current browser. Write the pattern without surrounding slash delimiters and enter JavaScript flags separately. Syntax can differ from PCRE, Python, Java or .NET regular expressions, so test the pattern in the same runtime where it will be used before relying on the result.
How do JavaScript regex flags work?
Use i for case-insensitive matching, m to make line anchors work per line, s to let a dot include newlines, and u or v for Unicode-aware behavior supported by the browser. Code Compass evaluates all matches even when g is omitted, while rejecting duplicate or invalid JavaScript flags.
How are matches and capture groups displayed?
Each result shows the matched text, its zero-based starting index, and any numbered capture-group values. Empty matches are handled without creating an endless loop, and output stops after 1,000 matches to keep the page responsive. The tester is useful for inspecting matches and groups; it does not currently provide a find-and-replace preview or PCRE-specific features.