# Patterns: Regular Expressions for grep

A regular expression describes the shape of the text you want instead of the exact words, so grep can find every phone number or every date in a file; this lesson builds patterns from . and \[ \], ^ and $, \* and, with grep -E, + and |.

![Cheat sheet for the lesson Patterns: Regular Expressions for grep: A regular expression describes the shape of the text you want instead of the exact words, so grep can find every phone number or every date in a file; this lesson builds patterns from . and \[ \], ^ and $, \* and, with grep -E, + and |.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/11579d10c9bf4b4d8071d4ba8a6d2045.webp)

- Category: Bash
- Level: Journeyman
- Tags: character-class, grep, linux, regular-expression-in-the-shell, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-regular-expressions-cheat-sheet
