Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The object returned by select-string representing the result of a match.
public ref class MatchInfo
[Windows::Foundation::Metadata::WebHostHidden] class MatchInfo
public class MatchInfo
type MatchInfo = class
Public Class MatchInfo
The context for the match, or null if -context was not specified.
Returns the base name of the file containing the matching line.
It will be the string "InputStream" if the object came from the input stream.
This is a readonly propery calculated from
Indicates if the match was done ignoring case.
Returns the text of the matching line.
Returns the number of the matching line.
A list of all Regex matches on the matching line.
The full path of the file containing the matching line. It will be "InputStream" if the object came from the input stream.
Returns the pattern that was used in the match.
Returns the path of the matching file truncated relative to the
Returns the string representation of this object. The format depends on whether a path has been set for this object or not. If the path component is set, as would be the case when matching in a file, ToString() would return the path, line number and line text. If path is not set, then just the line text is presented.
Returns the string representation of the match object same format as ToString()
but trims the path to be relative to the