MatchInfo Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

This object is returned by the Select-String cmdlet. It provides information about the results of a match.

Namespace:   Microsoft.PowerShell.Commands
Assembly:  Microsoft.PowerShell.Commands.Utility (in Microsoft.PowerShell.Commands.Utility.dll)

System.Object
  Microsoft.PowerShell.Commands.MatchInfo

public class MatchInfo

NameDescription
System_CAPS_pubmethodMatchInfo()

Creates a new MatchInfo object.

NameDescription
System_CAPS_pubpropertyContext

The context for the match, or null if not specified. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyFilename

Gets the name of the file that contains the selected string.

System_CAPS_pubpropertyIgnoreCase

Gets or sets a Boolean value that indicates whether case was ignored while the search was performed.

System_CAPS_pubpropertyLine

Gets and sets the line that was selected.

System_CAPS_pubpropertyLineNumber

Gets and sets the line number of the file where the string was selected.

System_CAPS_pubpropertyMatches

A list of all Regex matches on the matching line. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyPath

Gets and sets the full path to the file that contains the selected string.

System_CAPS_pubpropertyPattern

Gets and sets the pattern used to select the string.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodRelativePath(String)

Returns the relative path to the specified directory.

System_CAPS_pubmethodToString()

Converts the object to a string. The format of the string depends on whether a path has been set for the object.(Overrides Object.ToString().)

System_CAPS_pubmethodToString(String)

Converts the object to a string. The path included in the string is relative to the current directory.

For more information about the cmdlet that returns this object, see Select-String in the Microsoft TechNet Library.

For Help at the command line, type:

get-help select-string

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top

Community Additions

ADD
Show: