EN DE

Free, privacy-first

Regex Cheat Sheet

Browse common JavaScript regex tokens, group types, flags, and examples without leaving the browser.

Input values

Results

Results update as you use the interface above.

Examples

Start with safe sample text so you can test pattern design, flags, and expected matches before using production strings.

Email extraction

Finds addresses in a short support-style snippet without exposing any real personal data.

Sample inputs

Regex Pattern
[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}
Flags
g
Test Cases
[email protected] => 1 / not-an-email => 0

Result: Good for verifying global matching against realistic but harmless contact-style data.

Remove the g flag after loading the example to see how the output changes when only the first match is returned.

Order ID validation

Checks a strict business identifier pattern with uppercase prefixes and four numeric digits.

Sample inputs

Regex Pattern
\bORD-\d{4}\b
Flags
g
Test Cases
ORD-1024 => 1 / ord-55 => 0

Result: Useful when you need to test a predictable identifier format without exposing real customer data.

Switch to ^ and $ anchors after loading the example if you want to validate a full field instead of scanning larger text.

Frequently Asked Questions

Which regex engine is used?
The browser JavaScript RegExp engine. Patterns that work here will behave consistently in any browser-side JavaScript but may need adjustment for server-side engines like Python re or PCRE.
Can I test multiline input?
Yes, include the m flag when needed. The m flag makes ^ and $ match line starts and ends; use the s flag to make . match newlines across entire blocks.
How reliable are the calculated results in this tool?
The result is calculated directly from the values you enter. If the inputs are off, or the real situation differs from the model, the output will drift too. Use it as a solid estimate, then sanity-check it against the specifics of your project when the decision matters.
Are my inputs saved or sent to a server?
Calculations run locally in your browser session for immediate feedback, and no manual form submission is required. If you use export actions, files are generated and downloaded on your device. For sensitive workflows, you can still clear the form and browser data after use.
What input mistakes most often lead to misleading results?
The most common issues are unit mismatches, unrealistic defaults left unchanged, and incomplete boundary conditions. Double-check decimal separators, percentages versus absolute values, and the selected mode or profile before calculating. If results look unexpected, run a second scenario with conservative values to verify sensitivity.