🧩 Regex Cheat Sheet
⚡ Output
ℹ️ About Regex Cheat Sheet
Regular Expressions (Regex) are a powerful language for pattern matching and text manipulation, used across almost all programming languages and command-line tools like grep, sed, and awk. However, the syntax can be dense and difficult to remember.
Our Regex Cheat Sheet provides a fast, categorized reference for the most common tokens, quantifiers, and anchors. Whether you are building a validation script, searching through server logs, or refactoring code, this guide ensures you have the right syntax for your search patterns.
📖 How to use Regex Cheat Sheet
- 1. Browse the categories: Characters, Quantifiers, Anchors, and Groups.
- 2. Click 'Run Tool' to view the full reference table.
- 3. Use the tokens shown to build complex search and replace patterns in your favorite tools.
❓ Frequently Asked Questions
What is a 'word boundary' (\b)?
A word boundary matches the position between a word character and a non-word character (or the start/end of a string). It's used to find whole words only.
What is the difference between * and +?
The asterisk <code>*</code> matches the preceding element zero or more times, while the plus <code>+</code> requires at least one occurrence.
How do I escape a special character?
To match a character that has a special meaning in Regex (like a dot or a question mark), prefix it with a backslash: <code>\.</code> or <code>\?</code>.
🔗 Related SysAdmin Tools
Active Directory SID Interpreter
Parses Windows Security Identifiers (SIDs) into Revision, Identifier Authority, Domain ID, and RID with well-known account lookups.
Systemd Service Unit Generator
Generates Linux systemd .service unit configuration files with security hardening directives.
Logrotate Configuration Builder
Generates Linux logrotate configuration blocks for web servers, custom apps, and database logs.
SLO 'Error Budget' Calculator
Calculate allowed downtime based on Service Level Objectives (99.9% - 99.999%).
Linux Command Cheat Sheet
Quick reference for common Linux commands and their usage.
Windows Command Cheat Sheet
Quick reference for common Windows Command Prompt / PowerShell commands.