Skip to content

Commit 23d8ca7

Browse files
authored
Explain multiple pattern scenario (#12920)
1 parent 7baf667 commit 23d8ca7

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

reference/5.1/Microsoft.PowerShell.Utility/Select-String.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 06/07/2024
5+
ms.date: 04/02/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-string?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -598,7 +598,9 @@ Accept wildcard characters: True
598598

599599
### -Pattern
600600

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

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

reference/7.4/Microsoft.PowerShell.Utility/Select-String.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 11/05/2025
5+
ms.date: 04/02/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-string?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -706,7 +706,9 @@ Accept wildcard characters: True
706706

707707
### -Pattern
708708

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

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

reference/7.5/Microsoft.PowerShell.Utility/Select-String.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 11/05/2025
5+
ms.date: 04/02/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-string?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -706,7 +706,9 @@ Accept wildcard characters: True
706706

707707
### -Pattern
708708

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

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

reference/7.6/Microsoft.PowerShell.Utility/Select-String.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 11/05/2025
5+
ms.date: 04/02/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-string?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -706,7 +706,9 @@ Accept wildcard characters: True
706706

707707
### -Pattern
708708

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

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

0 commit comments

Comments
 (0)