C# Класс Patterns.Text.RegularExpressions.RegexEvaluator

Defines a default implementation of the IRegexEvaluator interface.
Наследование: IRegexEvaluator
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

IsMatch() публичный Метод

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.
Результат bool

Match() публичный Метод

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.
Результат System.Text.RegularExpressions.Match

Matches() публичный Метод

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.
Результат System.Text.RegularExpressions.MatchCollection

Replace() публичный Метод

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.
Результат string

Split() публичный Метод

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.
Результат string[]