Skip to content

Commit

Permalink
Merge pull request MicrosoftDocs#4526 from sdwheeler/sdw-ghi4525
Browse files Browse the repository at this point in the history
Fixes MicrosoftDocs#4525 - add link to MatchInfo class
  • Loading branch information
bobbytreed authored Jul 8, 2019
2 parents 7b646eb + 61f3990 commit 00d1509
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 28 deletions.
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

0 comments on commit 00d1509

Please sign in to comment.