Regular Expression Tester
Run a pattern against sample text and inspect what it matches before using it in an application.
Popular in this group
Switch tools without re-entering your text.
Loading tool…
About this tool
Regular Expression Tester — Regular expressions can search, validate, capture, and replace text, but syntax and supported features vary between engines.
Test representative input, including failures and edge cases. A pattern that matches one example is not automatically safe or complete.
How to use it
- Enter a pattern and the available flags.
- Paste non-sensitive sample text.
- Inspect matches and refine the pattern using both valid and invalid examples.
Example
Pattern: \b[A-Z]{2}-\d{4}\b
Text: Ref AB-2048 approvedMatch: AB-2048
Test the same pattern in the exact language and engine used by your application.
Common uses
- Prototype search and extraction patterns.
- Check validation rules against edge cases.
- Learn how groups and flags affect matches.
What to know
- The tool cannot prove that a pattern is secure or complete.
- Do not test private production data or run untrusted patterns against very large input.
Privacy: The operation runs locally in your browser; your input is not uploaded by this tool.
Frequently Asked Questions
Why does a pattern work here but not in my application?+
Regex engines differ in flags, lookbehind, Unicode handling, escaping, and replacement syntax.
Can regex validate every email address?+
A simple pattern can catch obvious mistakes, but full address rules and deliverability need application logic.
Can a regex be slow?+
Yes. Some nested or ambiguous patterns can cause excessive backtracking on certain inputs.