Class RegexHelper
Regular expression helper.
public static class RegexHelper
- Inheritance
-
objectRegexHelper
Properties
DefaultOptions
Default regular expression options.
public static RegexOptions DefaultOptions { get; set; }
Property Value
- RegexOptions
Methods
GetRegex(string)
Gets the regular expression specified by a matching pattern.
public static Regex GetRegex(string pattern)
Parameters
pattern
stringPattern to match
Returns
- Regex
GetRegex(string, bool)
Gets the regular expression specified by a matching pattern, optionally specifying processing options.
public static Regex GetRegex(string pattern, bool ignoreCase)
Parameters
pattern
stringPattern to match
ignoreCase
boolIf true, the regular expression is case insensitive
Returns
- Regex
GetRegex(string, RegexOptions)
Gets the regular expression specified by a matching pattern, optionally specifying processing options.
public static Regex GetRegex(string pattern, RegexOptions options)
Parameters
pattern
stringPattern to match
options
RegexOptionsProcessing options
Returns
- Regex