PowerShell: String Wildcards

By Xah Lee. Date: . Last updated: .

Wildcard can be used to represent string patterns. For example, dir "*jpg" means list any filename ending in jpg.

?
Match any character.
*
Match any character, zero or more times.
[a-z]
Match a range of characters a to z.
[chars]
Match any char in chars

PowerShell String

PowerShell

Practical How-To

list files

list dirs

on dir

on file

Windows config

misc


PowerShell in Depth

Programing PowerShell

Value Types

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Input/Output

Function

Profile and Script

Script Examples