About the Regex Tester
Regular expressions are easiest to write with immediate feedback. This tester runs a JavaScript regex against your sample text every time either changes, highlights each match in the text, and lists the matches below with their position and the contents of every capture group, numbered and named. The status shows the match count, so you can see at a glance whether a tweak helped.
Flags are set in the toolbar: i for case-insensitive, m for multiline anchors, s to let the dot match newlines, u for Unicode, and the global flag is always on so every match is found. An invalid pattern is reported with the engine's message rather than silently matching nothing. The syntax is JavaScript's, which is shared with most modern engines for everyday patterns; look-behind and named groups are supported.
Everything runs locally, so testing against real log lines or data is safe. To replace matches rather than list them, use Regex Replace; to pull the matches out as a list, Regex Extract; and for a plain-English breakdown of a pattern, the Regex Explainer.
How to use
- Paste the text to test against on the left.
- Type the pattern and flags in the toolbar.
- Read the highlighted matches and the group list; the count is in the status.
Common questions
- Which regex flavour is this?
- JavaScript (ECMAScript). Everyday syntax is the same in Python, Java and Go; some advanced features differ.
- How do I see capture groups?
- Each match in the list shows its numbered groups and any named groups.
- Do I need the g flag?
- No. Global matching is always on so every occurrence is found.
- Why does my pattern show an error?
- It is not valid regex syntax, for example an unclosed bracket. The message from the engine says what is wrong.