Table of Contents

Class RegexHelper

Namespace
CMS.Helpers
Assembly
CMS.Helpers.dll

Regular expression helper.

public static class RegexHelper
Inheritance
object
RegexHelper

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 string

Pattern 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 string

Pattern to match

ignoreCase bool

If 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 string

Pattern to match

options RegexOptions

Processing options

Returns

Regex