Regex Tester Online for JavaScript
For engineers writing log filters, validation rules and search patterns. Enter a pattern, flags and test text to see each match, where it starts and what each capture group grabbed.
Close the gaps with real-world projects
Build industry projects on ByteLabs and add verified proof of your skills to your public profile.
How to use the Regex Tester
- Enter your pattern in the Pattern box, without surrounding slashes.
- Set flags such as g, i or m in the Flags box.
- Paste the text to search into the Test string box and click Test.
- Read each match with its start index and any capture groups.
An example, step by step (example only)
You enter
Pattern: \b\w+@\w+\.\w+\b Flags: gi Text: Email me at hi@cbc.in or team@careerbytecode.in
The tool shows
Match 1 @12: hi@cbc.in Match 2 @25: team@careerbytecode.in (2 matches)
Questions about the Regex Tester
Which regex flavour does this tester use?
The JavaScript RegExp engine in your browser. Most syntax matches PCRE and Python, but features like possessive quantifiers are not available.
Do I need the g flag to see all matches?
No. The tester always lists every match; without g it adds the flag internally so you still see all of them.
How do I see what a capture group matched?
Wrap part of the pattern in parentheses. Each match line then lists the captured groups after the matched text.
Is the Regex Tester free and private?
Yes. It is free, needs no sign-up and runs entirely in your browser, so what you type is not uploaded. You only sign in if you want to email a result to yourself or save it to your CareerByteCode profile.