Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 320 Bytes

match_examples.md

File metadata and controls

15 lines (8 loc) · 320 Bytes

Match Operator Examples

Match with a regular expression

"fred" -match "^fred$"

returns True

But it is case insensitive by default.

Use -cmatch for case sensitive regular expression matching in PowerShelll

PascalCase cmdLets should maybe follow this regex.

"GetFunction" -cmatch "^([A-Z][a-z]+){2,}$"