Test a regex with both matches and non-matches
This tester uses browser JavaScript regular expressions. One successful match only validates that sample, not every possible input.
An example to check
Input and settings
/[A-Z]{2}\d{3}/g
AB123 cd456 EF789
Expected result
AB123
EF789
Enter [A-Z]{2}\d{3} as the pattern, enable g and use the second line as test text. Uppercase prefixes match; cd456 does not. Enable i to compare case-insensitive behavior.
Scope and limitations
- Separate slash delimiters from the pattern itself. Escaping in a JavaScript string literal is different from entering a regex pattern.
- Expensive backtracking can freeze the browser. Start with a short sample, then expand it. Other languages may use engines with different behavior.
Does a result differ from this reference? Share steps without private data. Report a problem