Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 06/07/2024
ms.date: 04/02/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-string?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -598,7 +598,9 @@ Accept wildcard characters: True

### -Pattern

Specifies the text to find on each line. The pattern value is treated as a regular expression.
Specifies the text to find on each line. The pattern value is treated as a regular expression. The
parameter accepts multiple patterns in an array. If you specify more than one pattern,
`Select-String` returns matches for each pattern.
Comment on lines +601 to +603
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -Pattern description states that the value "is treated as a regular expression", but this isn’t always true when -SimpleMatch is used (see the -SimpleMatch section, which says the Pattern value isn’t interpreted as regex). Consider rewording to "By default, the pattern is treated as a regular expression" (or cross-reference -SimpleMatch) so the behavior is accurately described.

Suggested change
Specifies the text to find on each line. The pattern value is treated as a regular expression. The
parameter accepts multiple patterns in an array. If you specify more than one pattern,
`Select-String` returns matches for each pattern.
Specifies the text to find on each line. By default, the pattern value is treated as a regular
expression. The parameter accepts multiple patterns in an array. If you specify more than one
pattern, `Select-String` returns matches for each pattern.

Copilot uses AI. Check for mistakes.

To learn about regular expressions, see
[about_Regular_Expressions](../Microsoft.PowerShell.Core/About/about_Regular_Expressions.md).
Expand Down
6 changes: 4 additions & 2 deletions reference/7.4/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 11/05/2025
ms.date: 04/02/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-string?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -706,7 +706,9 @@ Accept wildcard characters: True

### -Pattern

Specifies the text to find on each line. The pattern value is treated as a regular expression.
Specifies the text to find on each line. The pattern value is treated as a regular expression. The
parameter accepts multiple patterns in an array. If you specify more than one pattern,
`Select-String` returns matches for each pattern.
Comment on lines +709 to +711
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -Pattern description states that the value "is treated as a regular expression", but this isn’t always true when -SimpleMatch is used (see the -SimpleMatch section, which says the Pattern value isn’t interpreted as regex). Consider rewording to "By default, the pattern is treated as a regular expression" (or cross-reference -SimpleMatch) so the behavior is accurately described.

Suggested change
Specifies the text to find on each line. The pattern value is treated as a regular expression. The
parameter accepts multiple patterns in an array. If you specify more than one pattern,
`Select-String` returns matches for each pattern.
Specifies the text to find on each line. By default, the pattern value is treated as a
regular expression. Use **-SimpleMatch** to match the text literally. The parameter accepts
multiple patterns in an array. If you specify more than one pattern, `Select-String`
returns matches for each pattern.

Copilot uses AI. Check for mistakes.

To learn about regular expressions, see
[about_Regular_Expressions](../Microsoft.PowerShell.Core/About/about_Regular_Expressions.md).
Expand Down
6 changes: 4 additions & 2 deletions reference/7.5/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 11/05/2025
ms.date: 04/02/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-string?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -706,7 +706,9 @@ Accept wildcard characters: True

### -Pattern

Specifies the text to find on each line. The pattern value is treated as a regular expression.
Specifies the text to find on each line. The pattern value is treated as a regular expression. The
parameter accepts multiple patterns in an array. If you specify more than one pattern,
`Select-String` returns matches for each pattern.
Comment on lines +709 to +711
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -Pattern description states that the value "is treated as a regular expression", but this isn’t always true when -SimpleMatch is used (see the -SimpleMatch section, which says the Pattern value isn’t interpreted as regex). Consider rewording to "By default, the pattern is treated as a regular expression" (or cross-reference -SimpleMatch) so the behavior is accurately described.

Suggested change
Specifies the text to find on each line. The pattern value is treated as a regular expression. The
parameter accepts multiple patterns in an array. If you specify more than one pattern,
`Select-String` returns matches for each pattern.
Specifies the text to find on each line. By default, the pattern value is treated as a regular
expression. If you use **-SimpleMatch**, the pattern is matched literally. The parameter accepts
multiple patterns in an array. If you specify more than one pattern, `Select-String` returns
matches for each pattern.

Copilot uses AI. Check for mistakes.

To learn about regular expressions, see
[about_Regular_Expressions](../Microsoft.PowerShell.Core/About/about_Regular_Expressions.md).
Expand Down
6 changes: 4 additions & 2 deletions reference/7.6/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 11/05/2025
ms.date: 04/02/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-string?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -706,7 +706,9 @@ Accept wildcard characters: True

### -Pattern

Specifies the text to find on each line. The pattern value is treated as a regular expression.
Specifies the text to find on each line. The pattern value is treated as a regular expression. The
parameter accepts multiple patterns in an array. If you specify more than one pattern,
`Select-String` returns matches for each pattern.
Comment on lines +709 to +711
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -Pattern description states that the value "is treated as a regular expression", but this isn’t always true when -SimpleMatch is used (see the -SimpleMatch section, which says the Pattern value isn’t interpreted as regex). Consider rewording to "By default, the pattern is treated as a regular expression" (or cross-reference -SimpleMatch) so the behavior is accurately described.

Suggested change
Specifies the text to find on each line. The pattern value is treated as a regular expression. The
parameter accepts multiple patterns in an array. If you specify more than one pattern,
`Select-String` returns matches for each pattern.
Specifies the text to find on each line. By default, the pattern value is treated as a regular
expression. When you use **-SimpleMatch**, the value is interpreted literally. The parameter
accepts multiple patterns in an array. If you specify more than one pattern, `Select-String`
returns matches for each pattern.

Copilot uses AI. Check for mistakes.

To learn about regular expressions, see
[about_Regular_Expressions](../Microsoft.PowerShell.Core/About/about_Regular_Expressions.md).
Expand Down