In This Article

ISearchPatternProvider Interface

Provides the base requirements for an object that can provide regular expression find/replace patterns based on a supplied pattern.

public interface ISearchPatternProvider : IKeyedObject

Remarks

All find/replace operations are performed using the built-in regular expression engine. This interface allows for the creation of custom pattern formats and enables them to be converted to the core regular expression pattern syntax.

Properties

Description

Gets the description of the search pattern provider.

string Description { get; }

Property Value

System.String:

The description of the search pattern provider.

RequiresCaseSensitivity

Gets whether this pattern requires case sensitivity.

bool RequiresCaseSensitivity { get; }

Property Value

System.Boolean:

true if this pattern requires case sensitivity; otherwise, false.

Methods

GetFindPattern(String)

Returns the regular expression match pattern to use for find operations, based on the supplied pattern that uses this provider.

string GetFindPattern(string pattern)
Parameter Type Description
pattern System.String

The pattern to convert using this provider.

Returns

System.String:

The regular expression match pattern to use for find operations.

GetReplacePattern(String)

Returns the regular expression match pattern to use for replace operations, based on the supplied pattern that uses this provider.

string GetReplacePattern(string pattern)
Parameter Type Description
pattern System.String

The pattern to convert using this provider.

Returns

System.String:

The regular expression match pattern to use for replace operations.

Inherited Members