# Patterns: Regular Expressions with -match

A regular expression describes the shape of the text you want, such as two letters, a dash and some digits, and -match tests text against it, $Matches holds what it found, and Select-String uses the same patterns across many files.

![Cheat sheet for the lesson Patterns: Regular Expressions with -match: A regular expression describes the shape of the text you want, such as two letters, a dash and some digits, and -match tests text against it, $Matches holds what it found, and Select-String uses the same patterns across many…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/8fc264fbc27f48ed8543ffa1b39181f2.webp)

- Category: PowerShell
- Level: Journeyman
- Tags: match, matches, operating-system, powershell, regular-expression, select-string
- Updated: November 10, 2026

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