This documentation is archived and is not being maintained.
Regex Members
Represents an immutable regular expression.
The following tables list the members exposed by the
Regex
type.
Name
Description
Regex
Overloaded. Initializes a new instance of the Regex class.
Top
Name
Description
capnames Used by a Regex object generated by the CompileToAssembly method. caps Used by a Regex object generated by the CompileToAssembly method. capsize Used by a Regex object generated by the CompileToAssembly method. capslist Used by a Regex object generated by the CompileToAssembly method. factory Used by a Regex object generated by the CompileToAssembly method. pattern Used by a Regex object generated by the CompileToAssembly method. roptions Used by a Regex object generated by the CompileToAssembly method.
Top
Name
Description
CacheSize Gets or sets the maximum number of entries in the current static cache of compiled regular expressions. Options Returns the options passed into the Regex constructor. RightToLeft Gets a value indicating whether the regular expression searches from right to left.
Top
(see also
Protected Methods
)
Name
Description
CompileToAssembly
Overloaded.
Compiles regular expressions and saves them to disk in a single assembly.
Equals
Overloaded.
Determines whether two Object instances are equal.
(inherited from Object ) Escape
Escapes a minimal set of metacharacters (\, *, +, ?, |, {, [, (,), ^, $,., #, and white space) by replacing them with their escape codes.
GetGroupNames
Returns an array of capturing group names for the regular expression.
GetGroupNumbers
Returns an array of capturing group numbers that correspond to group names in an array.
GetHashCode
Serves as a hash function for a particular type.
(inherited from Object ) GetType
Gets the Type of the current instance.
(inherited from Object ) GroupNameFromNumber
Gets the group name that corresponds to the specified group number.
GroupNumberFromName
Returns the group number that corresponds to the specified group name.
IsMatch
Overloaded.
Indicates whether the regular expression finds a match in the input string.
Match
Overloaded.
Searches an input string for an occurrence of a regular expression and returns the precise result as a single Match object.
Matches
Overloaded.
Searches an input string for all occurrences of a regular expression and returns all the successful matches as if Match were called numerous times.
ReferenceEquals
Determines whether the specified Object instances are the same instance.
(inherited from Object ) Replace
Overloaded.
Within a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.
Split
Overloaded.
Splits an input string into an array of substrings at the positions defined by a regular expression match.
ToString
Overridden.
Returns the regular expression pattern that was passed into the Regex constructor.
Unescape
Unescapes any escaped characters in the input string.
Top
Name
Description
Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(inherited from Object ) InitializeReferences
Used by a Regex object generated by the CompileToAssembly method.
MemberwiseClone
Creates a shallow copy of the current Object .
(inherited from Object ) UseOptionC
Used by a Regex object generated by the CompileToAssembly method.
UseOptionR
Used by a Regex object generated by the CompileToAssembly method.
Top