Ad Space
Free Regex Cheatsheet
Interactive reference guide for regular expressions.
Ad Space
Test Pattern
No matches
How to Use
- Browse the pattern categories or use the search box to find specific patterns.
- Enter a regex pattern in the "Test Pattern" field and sample text in "Test Text".
- Toggle flags (global, case-insensitive, multiline) and see matches highlighted instantly.
Frequently Asked Questions
What is a regular expression?
A regular expression (regex or regexp) is a pattern used to match, search, and replace text. It uses special characters and syntax to define what strings to find.
What do the flags do?
Global (g) finds all matches. Case Insensitive (i) ignores letter case. Multiline (m) treats ^ and $ as line boundaries instead of string boundaries.
Can I use this cheatsheet in my code?
Yes! Once you've tested a pattern here and verified it works, copy the regex pattern directly into your JavaScript, Python, or other programming language.