CommentRegex 类

定义

提供用于分析 ASP.NET 注释块的正则表达式。Provides a regular expression to parse an ASP.NET comment block.

此 API 支持产品基础结构,不能在代码中直接使用。

public ref class CommentRegex : System::Text::RegularExpressions::Regex
public class CommentRegex : System.Text.RegularExpressions.Regex
type CommentRegex = class
    inherit Regex
Public Class CommentRegex
Inherits Regex
继承
CommentRegex

注解

CommentRegex类提供已编译的正则表达式来分析 ASP.NET 注释块 (<%-- .。。The CommentRegex class provides a compiled regular expression to parse an ASP.NET comment block (<%-- --%>).--%>).

备注

System.Web.RegularExpressions类由 .NET Framework 在内部使用,用于分析 ASP.NET 页。The System.Web.RegularExpressions classes are used internally by the .NET Framework to parse ASP.NET pages.

构造函数

CommentRegex()

此 API 支持产品基础结构,不能在代码中直接使用。

初始化 CommentRegex 类的新实例。Initializes a new instance of the CommentRegex class.

CommentRegex(TimeSpan)

此 API 支持产品基础结构,不能在代码中直接使用。

用指定的超时值初始化 CommentRegex 类的新实例。Initializes a new instance of the CommentRegex class with the specified time-out value.

字段

capnames

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)
caps

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)
capsize

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)
capslist

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)
factory

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)
internalMatchTimeout

操作超时之前在一个模式匹配操作中可以经过的最长时间。The maximum amount of time that can elapse in a pattern-matching operation before the operation times out.

(继承自 Regex)
pattern

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)
roptions

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)

属性

CapNames

获取或设置将命名捕获组映射到其索引值的字典。Gets or sets a dictionary that maps named capturing groups to their index values.

(继承自 Regex)
Caps

获取或设置将编号捕获组映射到其索引值的字典。Gets or sets a dictionary that maps numbered capturing groups to their index values.

(继承自 Regex)
MatchTimeout

获取当前实例的超时间隔。Gets the time-out interval of the current instance.

(继承自 Regex)
Options

获取传递给 Regex 构造函数的选项。Gets the options that were passed into the Regex constructor.

(继承自 Regex)
RightToLeft

获取一个值,该值指示正则表达式是否从右向左进行搜索。Gets a value that indicates whether the regular expression searches from right to left.

(继承自 Regex)

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetGroupNames()

返回正则表达式的捕获组名数组。Returns an array of capturing group names for the regular expression.

(继承自 Regex)
GetGroupNumbers()

返回与数组中的组名相对应的捕获组号的数组。Returns an array of capturing group numbers that correspond to group names in an array.

(继承自 Regex)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GroupNameFromNumber(Int32)

获取与指定组号相对应的组名。Gets the group name that corresponds to the specified group number.

(继承自 Regex)
GroupNumberFromName(String)

返回与指定组名相对应的组号。Returns the group number that corresponds to the specified group name.

(继承自 Regex)
InitializeReferences()

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)
IsMatch(String)

指示 Regex 构造函数中指定的正则表达式在指定的输入字符串中是否找到了匹配项。Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input string.

(继承自 Regex)
IsMatch(String, Int32)

指示 Regex 构造函数中指定的正则表达式在指定的输入字符串中,从该字符串中的指定起始位置开始是否找到了匹配项。Indicates whether the regular expression specified in the Regex constructor finds a match in the specified input string, beginning at the specified starting position in the string.

(继承自 Regex)
Match(String)

在指定的输入字符串中搜索 Regex 构造函数中指定的正则表达式的第一个匹配项。Searches the specified input string for the first occurrence of the regular expression specified in the Regex constructor.

(继承自 Regex)
Match(String, Int32)

从输入字符串中的指定起始位置开始,在该字符串中搜索正则表达式的第一个匹配项。Searches the input string for the first occurrence of a regular expression, beginning at the specified starting position in the string.

(继承自 Regex)
Match(String, Int32, Int32)

从指定的起始位置开始,在输入字符串中搜索正则表达式的第一个匹配项,并且仅搜索指定数量的字符。Searches the input string for the first occurrence of a regular expression, beginning at the specified starting position and searching only the specified number of characters.

(继承自 Regex)
Matches(String)

在指定的输入字符串中搜索正则表达式的所有匹配项。Searches the specified input string for all occurrences of a regular expression.

(继承自 Regex)
Matches(String, Int32)

从字符串中的指定起始位置开始,在指定的输入字符串中搜索正则表达式的所有匹配项。Searches the specified input string for all occurrences of a regular expression, beginning at the specified starting position in the string.

(继承自 Regex)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Replace(String, MatchEvaluator)

在指定的输入字符串中,使用由 MatchEvaluator 委托返回的字符串替换与指定的正则表达式匹配的所有字符串。In a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate.

(继承自 Regex)
Replace(String, MatchEvaluator, Int32)

在指定的输入字符串内,使用 MatchEvaluator 委托返回的字符串替换与某个正则表达式模式匹配的字符串(其数目为指定的最大数目)。In a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a MatchEvaluator delegate.

(继承自 Regex)
Replace(String, MatchEvaluator, Int32, Int32)

在指定的输入子字符串内,使用 MatchEvaluator 委托返回的字符串替换与某个正则表达式模式匹配的字符串(其数目为指定的最大数目)。In a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a MatchEvaluator delegate.

(继承自 Regex)
Replace(String, String)

在指定的输入字符串内,使用指定的替换字符串替换与某个正则表达式模式匹配的所有的字符串。In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.

(继承自 Regex)
Replace(String, String, Int32)

在指定输入字符串内,使用指定替换字符串替换与某个正则表达式模式匹配的字符串(其数目为指定的最大数目)。In a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string.

(继承自 Regex)
Replace(String, String, Int32, Int32)

在指定输入子字符串内,使用指定替换字符串替换与某个正则表达式模式匹配的字符串(其数目为指定的最大数目)。In a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string.

(继承自 Regex)
Split(String)

在由 Regex 构造函数指定的正则表达式模式所定义的位置,将输入字符串拆分为子字符串数组。Splits an input string into an array of substrings at the positions defined by a regular expression pattern specified in the Regex constructor.

(继承自 Regex)
Split(String, Int32)

在由 Regex 构造函数中指定的正则表达式定义的位置,将输入字符串拆分为子字符串数组指定的最大次数。Splits an input string a specified maximum number of times into an array of substrings, at the positions defined by a regular expression specified in the Regex constructor.

(继承自 Regex)
Split(String, Int32, Int32)

在由 Regex 构造函数中指定的正则表达式定义的位置,将输入字符串拆分为子字符串数组指定的最大次数。Splits an input string a specified maximum number of times into an array of substrings, at the positions defined by a regular expression specified in the Regex constructor. 从输入字符串的指定字符位置开始搜索正则表达式模式。The search for the regular expression pattern starts at a specified character position in the input string.

(继承自 Regex)
ToString()

返回传入 Regex 构造函数的正则表达式模式。Returns the regular expression pattern that was passed into the Regex constructor.

(继承自 Regex)
UseOptionC()

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)
UseOptionR()

CompileToAssembly 方法生成的 Regex 对象使用。Used by a Regex object generated by the CompileToAssembly method.

(继承自 Regex)

显式接口实现

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

使用所需的数据填充 SerializationInfo 对象来反序列化当前 Regex 对象。Populates a SerializationInfo object with the data necessary to deserialize the current Regex object.

(继承自 Regex)

适用于

另请参阅