Regex Tester
Free JavaScript regex tester against sample text - toggle flags, inspect highlighted matches, and read numbered or named capture groups (enter the pattern without surrounding slashes).
Pattern token reference
Token hints are not a complete semantic explanation of nested expressions.
\b A word boundary
\w A word character (letter, digit, or underscore)
+ One or more of the preceding token
@ A literal "@" character
\w A word character (letter, digit, or underscore)
+ One or more of the preceding token
\. A literal "." character (escaped)
\w A word character (letter, digit, or underscore)
+ One or more of the preceding token
\b A word boundary
JavaScript RegExp tester for one pattern and one test string (2,000 / 50,000 chars, 1,000 matches, 500 ms timeout). No Python/PCRE switch and no replace box.
See moreSee less about the Regex Tester
Examples
Find order numbers
Pattern: \d+
Flags: g
Text: Order 12 costs 34
Matches: 12 at index 6; 34 at index 15JavaScript RegExp only - not Python or PCRE. Limits: 2,000 pattern chars, 50,000 test chars, 1,000 matches, 500 ms worker timeout. The detailed list shows the first 100 matches.
Named groups for a slug
Pattern: (?<kind>blog|docs)/(?<slug>[a-z0-9-]+)
Flags: g
Text: /blog/hello-world
Groups: kind=blog, slug=hello-worldThis page tests matches; it does not run replace. For lookahead/lookbehind walkthroughs, open the related tutorial on the page.
Key features
- JavaScript flags and highlights
- Match offsets and capture groups
- No upload, runs locally