Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4525 - add link to MatchInfo class #4526

Merged
merged 1 commit into from
Jul 8, 2019
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
9 changes: 5 additions & 4 deletions reference/3.0/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
9 changes: 5 additions & 4 deletions reference/4.0/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
9 changes: 5 additions & 4 deletions reference/5.0/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
9 changes: 5 additions & 4 deletions reference/5.1/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
19 changes: 11 additions & 8 deletions reference/6/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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[]
Expand Down
9 changes: 5 additions & 4 deletions reference/7/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down