C# Class Patterns.Text.RegularExpressions.RegexEvaluator

Defines a default implementation of the IRegexEvaluator interface.
Inheritance: IRegexEvaluator
Afficher le fichier Open project: patterns-group/code-patterns

Méthodes publiques

Méthode Description
IsMatch ( string input, CompiledRegex pattern ) : bool

Indicates whether the regular expression finds a match in the input string.

Match ( string input, CompiledRegex pattern ) : Match

Searches the specified input string for the first occurrence of the specified regular expression.

Matches ( string input, CompiledRegex pattern ) : MatchCollection

Searches the specified input string for all occurrences of a specified regular expression.

Replace ( string input, CompiledRegex pattern, string replacement ) : string

In a specified input string, replaces all strings that match a specified regular expression with a specified replacement string.

Split ( string input, CompiledRegex pattern ) : string[]

Splits an input string into an array of substrings at the positions defined by a regular expression pattern.

Method Details

IsMatch() public méthode

Indicates whether the regular expression finds a match in the input string.
public IsMatch ( string input, CompiledRegex pattern ) : bool
input string The string to search for a match.
pattern CompiledRegex The regular expression pattern to match.
Résultat bool

Match() public méthode

Searches the specified input string for the first occurrence of the specified regular expression.
public Match ( string input, CompiledRegex pattern ) : Match
input string The string to search for a match.
pattern CompiledRegex The regular expression pattern to match.
Résultat System.Text.RegularExpressions.Match

Matches() public méthode

Searches the specified input string for all occurrences of a specified regular expression.
public Matches ( string input, CompiledRegex pattern ) : MatchCollection
input string The string to search for a match.
pattern CompiledRegex The regular expression pattern to match.
Résultat System.Text.RegularExpressions.MatchCollection

Replace() public méthode

In a specified input string, replaces all strings that match a specified regular expression with a specified replacement string.
public Replace ( string input, CompiledRegex pattern, string replacement ) : string
input string The string to search for a match.
pattern CompiledRegex The regular expression pattern to match.
replacement string The replacement string.
Résultat string

Split() public méthode

Splits an input string into an array of substrings at the positions defined by a regular expression pattern.
public Split ( string input, CompiledRegex pattern ) : string[]
input string The string to search for a match.
pattern CompiledRegex The regular expression pattern to match.
Résultat string[]