Regex Tester
Test regular expressions against sample text.
LocalYour data is processed locally in your browser and is not uploaded to Alphzen.
0 matches.
How to use
- Enter a pattern without wrapping slashes.
- Select flags (g, i, m, s, u, y, d, v) as needed.
- Paste the text to test. Select Test, or replace if you also need substitutions.
- Inspect match positions and groups. Invalid patterns are explained instead of crashing.
Features
- Uses the JavaScript RegExp engine in your browser — the same rules as your frontend code.
- Reports capture groups and named groups.
- Replace uses string replacement syntax ($&, $1), not eval.
- Caps match count so a runaway pattern is less likely to freeze the tab.
- Local processing only.
Examples
[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}This is a rough filter, not an RFC 5322 validator.
FAQ
Which regex flavour is this?
JavaScript (ECMAScript), including named groups and the flags your browser supports. It is not PCRE, Python, or POSIX.
Can a regex hang the page?
Pathological patterns can be slow. Alphzen caps the test string size and the number of matches. It does not run the regex in a Web Worker in this version, so avoid nested quantifiers on huge input.
Why not wrap the pattern in slashes?
The pattern field is the source passed to new RegExp(). Surrounding slashes would be treated as part of the pattern.
Related guides
Related tools
About this tool
A regex tester answers whether a pattern matches, where, and what it captured. That is the check you want before shipping a filter or a replace in application code.
Alphzen uses the browser engine, so results match what JavaScript will do — including the quirks. It is not a substitute for tests in your repo, but it is faster than guessing.
Related: JSON Formatter if your test payload is minified JSON, and Word Counter if you only need length statistics.