C# Class Quartz.TextToSchedule.Util.RegexHelper

Helper class to help with common regular expression tasks.
显示文件 Open project: amazing-andrew/Quartz.TextToSchedule

Public Methods

Method Description
Builder_Capture ( string captureName, string pattern ) : string

Wraps a pattern with a regular expression named capture.

Builder_GroupOf ( string items ) : string

group that can be an match any one of the given alternates.

Builder_GroupOf ( string captureName, string items ) : string

Builds a named capture group that can be an match any one of the given alternates.

Builder_ListOf ( string regex, string LIST_SEPARATOR ) : string

Wraps a pattern to turn into into a list of the same value that is separated with a separator.

Builder_Range ( string regex, string RANGE_SEPARATOR ) : string

Builds the range syntax between values.

GetNamedMatches ( Regex regex, Match m ) : NameValueCollection

Gets the regular expression captured groups that have names.

GetNamedMatches ( string input, string expression ) : NameValueCollection

Gets the regular expression captured groups that have names.

IsFullMatch ( string input, string pattern ) : bool

Wraps the pattern with "^" and "$" to match only the exact string contents.

Method Details

Builder_Capture() public static method

Wraps a pattern with a regular expression named capture.
public static Builder_Capture ( string captureName, string pattern ) : string
captureName string Name of the capture.
pattern string The pattern.
return string

Builder_GroupOf() public static method

group that can be an match any one of the given alternates.
public static Builder_GroupOf ( string items ) : string
items string The items.
return string

Builder_GroupOf() public static method

Builds a named capture group that can be an match any one of the given alternates.
public static Builder_GroupOf ( string captureName, string items ) : string
captureName string Name of the capture group.
items string The items.
return string

Builder_ListOf() public static method

Wraps a pattern to turn into into a list of the same value that is separated with a separator.
public static Builder_ListOf ( string regex, string LIST_SEPARATOR ) : string
regex string The regex.
LIST_SEPARATOR string The list separator regex.
return string

Builder_Range() public static method

Builds the range syntax between values.
public static Builder_Range ( string regex, string RANGE_SEPARATOR ) : string
regex string The regex.
RANGE_SEPARATOR string The range separator syntax.
return string

GetNamedMatches() public static method

Gets the regular expression captured groups that have names.
public static GetNamedMatches ( Regex regex, Match m ) : NameValueCollection
regex System.Text.RegularExpressions.Regex The regex.
m System.Text.RegularExpressions.Match The regular expression match.
return System.Collections.Specialized.NameValueCollection

GetNamedMatches() public static method

Gets the regular expression captured groups that have names.
public static GetNamedMatches ( string input, string expression ) : NameValueCollection
input string The input.
expression string The expression.
return System.Collections.Specialized.NameValueCollection

IsFullMatch() public static method

Wraps the pattern with "^" and "$" to match only the exact string contents.
public static IsFullMatch ( string input, string pattern ) : bool
input string The input.
pattern string The pattern.
return bool