System.Text.RegularExpressions Namespace

System.Text.RegularExpressions 命名空間包含提供存取 .NET Framework 規則運算式引擎的類別。 The System.Text.RegularExpressions namespace contains classes that provide access to the .NET Framework regular expression engine. 命名空間所提供的規則運算式功能可用於任何平台或 Microsoft .NET Framework 內執行的語言。 The namespace provides regular expression functionality that may be used from any platform or language that runs within the Microsoft .NET Framework. 除了這個命名空間中包含的型別以外,RegexStringValidator 類別可讓您判斷特定字串是否符合規則運算式模式。 In addition to the types contained in this namespace, the RegexStringValidator class enables you to determine whether a particular string conforms to a regular expression pattern.

類別

Capture

代表單一子運算式成功擷取的結果。Represents the results from a single successful subexpression capture.

CaptureCollection

代表單一擷取群組完成的擷取集合。Represents the set of captures made by a single capturing group.

Group

表示單一擷取群組的結果。Represents the results from a single capturing group.

GroupCollection

在單一比對中傳回擷取之群組的集合。Returns the set of captured groups in a single match.

Match

表示單一規則運算式 (Regular Expression) 比對的結果。Represents the results from a single regular expression match.

MatchCollection

表示藉由重複套用規則運算式 (Regular Expression) 模式至輸入字串,所找到的成功比對的集合。Represents the set of successful matches found by iteratively applying a regular expression pattern to the input string.

Regex

表示不變的規則運算式 (Regular Expression)。Represents an immutable regular expression.

RegexCompilationInfo

提供有關規則運算式的資訊,用於將規則運算式編譯成獨立組件。Provides information about a regular expression that is used to compile a regular expression to a stand-alone assembly.

RegexMatchTimeoutException

當規則運算式模式比對方法的執行時間超過其逾時間隔時,所擲回的例外狀況。The exception that is thrown when the execution time of a regular expression pattern-matching method exceeds its time-out interval.

RegexRunner

RegexRunner 類別是編譯的規則運算式 (Regular Expression) 之基底類別。The RegexRunner class is the base class for compiled regular expressions.

RegexRunnerFactory

建立已編譯之規則運算式 (Regular Expression) 的 RegexRunner 類別。Creates a RegexRunner class for a compiled regular expression.

列舉

RegexOptions

提供用來設定規則運算式 (Regular Expression) 選項的列舉值。Provides enumerated values to use to set regular expression options.

委派

MatchEvaluator

表示每次在 Replace 方法作業期間找到規則運算式 (Regular Expression) 相符項目時都會呼叫的方法。Represents the method that is called each time a regular expression match is found during a Replace method operation.