Regex Cheatsheet
Regular expression syntax reference with examples. Click any syntax to copy.
Character Classes
.Any character except newline\dDigit [0-9]\DNon-digit [^0-9]\wWord character [a-zA-Z0-9_]\WNon-word character\sWhitespace [\t\n\r\f\v ]\SNon-whitespace[abc]Character set (a, b, or c)[^abc]Negated set (not a, b, or c)[a-z]Range (a through z)Anchors
^Start of string/line$End of string/line\bWord boundary\BNon-word boundaryQuantifiers
*Zero or more+One or more?Zero or one (optional){n}Exactly n times{n,}n or more times{n,m}Between n and m times*?Lazy zero or more+?Lazy one or moreGroups & References
(abc)Capturing group(?:abc)Non-capturing group(?<name>abc)Named capturing group\1Backreference to group 1|Alternation (OR)Lookaheads & Lookbehinds
(?=abc)Positive lookahead(?!abc)Negative lookahead(?<=abc)Positive lookbehind(?<!abc)Negative lookbehindFlags
gGlobal (match all)iCase insensitivemMultiline (^ and $ per line)sDotall (. matches newline)Common Patterns
https?://[\w.-]+URL\d{3}-\d{3}-\d{4}US phone number#([a-fA-F0-9]{3}){1,2}\bHex color code\b\d{1,3}(\.\d{1,3}){3}\bIPv4 addressHow to Use Regex Cheatsheet
- Paste your code or data into the input field
- Choose the operation you want to perform
- View the formatted, validated, or transformed output
- Copy the result or download if available
Why Use Regex Cheatsheet?
Developer tools on FreeTools.one are designed to replace the dozen browser tabs you'd otherwise need. JSON formatting, regex testing, JWT decoding, SQL formatting, diff checking — everything runs in your browser with zero configuration. There's nothing to install, no CLI to learn, no Docker containers to spin up. Each tool provides professional-grade output with syntax highlighting, error detection, and one-click copy. Your code and data never leave your device because all processing happens client-side. These tools are built by developers, for developers, with the exact features you need: customizable indentation, multiple output formats, real-time validation, and keyboard shortcuts. They're fast enough for quick checks during coding sessions and powerful enough for production data transformation.
- No installation needed — works directly in your browser
- Client-side processing keeps your code private
- Professional-grade formatting and validation
- Save hours of manual coding and debugging
Frequently Asked Questions
Is my code sent to a server?
No. All processing happens in your browser. Your code never leaves your device.
Does it support syntax highlighting?
Yes. Output is displayed with proper formatting for easy reading.
Can I use this for production code?
Absolutely. The output is clean and ready for production use.