diff --git a/reference/3.0/Microsoft.PowerShell.Utility/Select-String.md b/reference/3.0/Microsoft.PowerShell.Utility/Select-String.md index 972810dd01ec..63dec472dbcc 100644 --- a/reference/3.0/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/3.0/Microsoft.PowerShell.Utility/Select-String.md @@ -352,16 +352,17 @@ In the default display, lines with a match are indicated by a right angle bracke in the first column of the display. Unmarked lines are the context. The **Context** parameter does not change the number of objects generated by `Select-String`. -`Select-String` generates one **MatchInfo** (**Microsoft.PowerShell.Commands.MatchInfo**) object for -each match. The context is stored as an array of strings in the **Context** property of the object. +`Select-String` generates one [MatchInfo](/dotnet/api/microsoft.powershell.commands.matchinfo) +object for each match. The context is stored as an array of strings in the **Context** property of +the object. When the output of a `Select-String` command is sent down the pipeline to another `Select-String` command, the receiving command searches only the text in the matched line. The matched line is the value of the **Line** property of the **MatchInfo** object, not the text in the context lines. As a result, the **Context** parameter is not valid on the receiving `Select-String` command. -When the context includes a match, the **MatchInfo** object for each match includes all of the -context lines, but the overlapping lines appear only once in the display. +When the context includes a match, the **MatchInfo** object for each match includes all the context +lines, but the overlapping lines appear only once in the display. ```yaml Type: Int32[] diff --git a/reference/4.0/Microsoft.PowerShell.Utility/Select-String.md b/reference/4.0/Microsoft.PowerShell.Utility/Select-String.md index 790085c9db98..8ce843b0df9a 100644 --- a/reference/4.0/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/4.0/Microsoft.PowerShell.Utility/Select-String.md @@ -352,16 +352,17 @@ In the default display, lines with a match are indicated by a right angle bracke in the first column of the display. Unmarked lines are the context. The **Context** parameter does not change the number of objects generated by `Select-String`. -`Select-String` generates one **MatchInfo** (**Microsoft.PowerShell.Commands.MatchInfo**) object for -each match. The context is stored as an array of strings in the **Context** property of the object. +`Select-String` generates one [MatchInfo](/dotnet/api/microsoft.powershell.commands.matchinfo) +object for each match. The context is stored as an array of strings in the **Context** property of +the object. When the output of a `Select-String` command is sent down the pipeline to another `Select-String` command, the receiving command searches only the text in the matched line. The matched line is the value of the **Line** property of the **MatchInfo** object, not the text in the context lines. As a result, the **Context** parameter is not valid on the receiving `Select-String` command. -When the context includes a match, the **MatchInfo** object for each match includes all of the -context lines, but the overlapping lines appear only once in the display. +When the context includes a match, the **MatchInfo** object for each match includes all the context +lines, but the overlapping lines appear only once in the display. ```yaml Type: Int32[] diff --git a/reference/5.0/Microsoft.PowerShell.Utility/Select-String.md b/reference/5.0/Microsoft.PowerShell.Utility/Select-String.md index a421567b6201..98bd0f4e2c6e 100644 --- a/reference/5.0/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/5.0/Microsoft.PowerShell.Utility/Select-String.md @@ -352,16 +352,17 @@ In the default display, lines with a match are indicated by a right angle bracke in the first column of the display. Unmarked lines are the context. The **Context** parameter does not change the number of objects generated by `Select-String`. -`Select-String` generates one **MatchInfo** (**Microsoft.PowerShell.Commands.MatchInfo**) object for -each match. The context is stored as an array of strings in the **Context** property of the object. +`Select-String` generates one [MatchInfo](/dotnet/api/microsoft.powershell.commands.matchinfo) +object for each match. The context is stored as an array of strings in the **Context** property of +the object. When the output of a `Select-String` command is sent down the pipeline to another `Select-String` command, the receiving command searches only the text in the matched line. The matched line is the value of the **Line** property of the **MatchInfo** object, not the text in the context lines. As a result, the **Context** parameter is not valid on the receiving `Select-String` command. -When the context includes a match, the **MatchInfo** object for each match includes all of the -context lines, but the overlapping lines appear only once in the display. +When the context includes a match, the **MatchInfo** object for each match includes all the context +lines, but the overlapping lines appear only once in the display. ```yaml Type: Int32[] diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md b/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md index a421567b6201..98bd0f4e2c6e 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md @@ -352,16 +352,17 @@ In the default display, lines with a match are indicated by a right angle bracke in the first column of the display. Unmarked lines are the context. The **Context** parameter does not change the number of objects generated by `Select-String`. -`Select-String` generates one **MatchInfo** (**Microsoft.PowerShell.Commands.MatchInfo**) object for -each match. The context is stored as an array of strings in the **Context** property of the object. +`Select-String` generates one [MatchInfo](/dotnet/api/microsoft.powershell.commands.matchinfo) +object for each match. The context is stored as an array of strings in the **Context** property of +the object. When the output of a `Select-String` command is sent down the pipeline to another `Select-String` command, the receiving command searches only the text in the matched line. The matched line is the value of the **Line** property of the **MatchInfo** object, not the text in the context lines. As a result, the **Context** parameter is not valid on the receiving `Select-String` command. -When the context includes a match, the **MatchInfo** object for each match includes all of the -context lines, but the overlapping lines appear only once in the display. +When the context includes a match, the **MatchInfo** object for each match includes all the context +lines, but the overlapping lines appear only once in the display. ```yaml Type: Int32[] diff --git a/reference/6/Microsoft.PowerShell.Utility/Select-String.md b/reference/6/Microsoft.PowerShell.Utility/Select-String.md index 8f0cd59e51af..ba7197422a43 100644 --- a/reference/6/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/6/Microsoft.PowerShell.Utility/Select-String.md @@ -54,10 +54,12 @@ match is found. `Select-String` uses regular expression matching, but it can also perform a match that searches the input for the text that you specify. -`Select-String` can display all of the text matches or stop after the first match in each input -file. `Select-String` can be used to display all text that does not match the specified pattern. You -can also specify that `Select-String` should expect a particular character encoding, such as when -you are searching files of Unicode text. +`Select-String` can display all the text matches or stop after the first match in each input +file. `Select-String` can be used to display all text that does not match the specified pattern. + +You can also specify that `Select-String` should expect a particular character encoding, such as +when you are searching files of Unicode text. `Select-String` uses the byte-order-mark (BOM) to +detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8. ## EXAMPLES @@ -352,16 +354,17 @@ In the default display, lines with a match are indicated by a right angle bracke in the first column of the display. Unmarked lines are the context. The **Context** parameter does not change the number of objects generated by `Select-String`. -`Select-String` generates one **MatchInfo** (**Microsoft.PowerShell.Commands.MatchInfo**) object for -each match. The context is stored as an array of strings in the **Context** property of the object. +`Select-String` generates one [MatchInfo](/dotnet/api/microsoft.powershell.commands.matchinfo) +object for each match. The context is stored as an array of strings in the **Context** property of +the object. When the output of a `Select-String` command is sent down the pipeline to another `Select-String` command, the receiving command searches only the text in the matched line. The matched line is the value of the **Line** property of the **MatchInfo** object, not the text in the context lines. As a result, the **Context** parameter is not valid on the receiving `Select-String` command. -When the context includes a match, the **MatchInfo** object for each match includes all of the -context lines, but the overlapping lines appear only once in the display. +When the context includes a match, the **MatchInfo** object for each match includes all the context +lines, but the overlapping lines appear only once in the display. ```yaml Type: Int32[] diff --git a/reference/7/Microsoft.PowerShell.Utility/Select-String.md b/reference/7/Microsoft.PowerShell.Utility/Select-String.md index d429fe78c089..b129374617e9 100644 --- a/reference/7/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/7/Microsoft.PowerShell.Utility/Select-String.md @@ -352,16 +352,17 @@ In the default display, lines with a match are indicated by a right angle bracke in the first column of the display. Unmarked lines are the context. The **Context** parameter does not change the number of objects generated by `Select-String`. -`Select-String` generates one **MatchInfo** (**Microsoft.PowerShell.Commands.MatchInfo**) object for -each match. The context is stored as an array of strings in the **Context** property of the object. +`Select-String` generates one [MatchInfo](/dotnet/api/microsoft.powershell.commands.matchinfo) +object for each match. The context is stored as an array of strings in the **Context** property of +the object. When the output of a `Select-String` command is sent down the pipeline to another `Select-String` command, the receiving command searches only the text in the matched line. The matched line is the value of the **Line** property of the **MatchInfo** object, not the text in the context lines. As a result, the **Context** parameter is not valid on the receiving `Select-String` command. -When the context includes a match, the **MatchInfo** object for each match includes all of the -context lines, but the overlapping lines appear only once in the display. +When the context includes a match, the **MatchInfo** object for each match includes all the context +lines, but the overlapping lines appear only once in the display. ```yaml Type: Int32[]