ToolSci.com

🧩 Regex Cheat Sheet

A quick reference guide for common Regular Expression (Regex) syntax and patterns.

ℹ️ 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. 1. Browse the categories: Characters, Quantifiers, Anchors, and Groups.
  2. 2. Click 'Run Tool' to view the full reference table.
  3. 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