RegexRunner.Scan 方法

定義

CompileToAssembly 方法所產生的 Regex 物件使用。

多載

Scan(ReadOnlySpan<Char>)

物件 Regex 用來掃描輸入 text 以尋找下一個相符專案。

Scan(Regex, String, Int32, Int32, Int32, Int32, Boolean)

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

已淘汰.

CompileToAssembly 方法所產生的 Regex 物件使用。

Scan(Regex, String, Int32, Int32, Int32, Int32, Boolean, TimeSpan)

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

已淘汰.

CompileToAssembly 方法所產生的 Regex 物件使用。

Scan(ReadOnlySpan<Char>)

Source:
RegexRunner.cs
Source:
RegexRunner.cs
Source:
RegexRunner.cs

物件 Regex 用來掃描輸入 text 以尋找下一個相符專案。

protected public:
 virtual void Scan(ReadOnlySpan<char> text);
protected internal virtual void Scan (ReadOnlySpan<char> text);
abstract member Scan : ReadOnlySpan<char> -> unit
override this.Scan : ReadOnlySpan<char> -> unit
Protected Friend Overridable Sub Scan (text As ReadOnlySpan(Of Char))

參數

text
ReadOnlySpan<Char>

進行模式比對所掃描的文字。

例外狀況

ReadOnlySpan<T>從 所產生的 CompileToAssembly 衍生型別不支援 Regex 以 為基礎的 Regex 方法。

備註

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

適用於

Scan(Regex, String, Int32, Int32, Int32, Int32, Boolean)

Source:
RegexRunner.cs
Source:
RegexRunner.cs
Source:
RegexRunner.cs

警告

This API supports obsolete mechanisms for Regex extensibility. It is not supported.

CompileToAssembly 方法所產生的 Regex 物件使用。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

protected public:
 System::Text::RegularExpressions::Match ^ Scan(System::Text::RegularExpressions::Regex ^ regex, System::String ^ text, int textbeg, int textend, int textstart, int prevlen, bool quick);
protected internal System.Text.RegularExpressions.Match? Scan (System.Text.RegularExpressions.Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick);
[System.Obsolete("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected internal System.Text.RegularExpressions.Match? Scan (System.Text.RegularExpressions.Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick);
protected internal System.Text.RegularExpressions.Match Scan (System.Text.RegularExpressions.Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick);
member this.Scan : System.Text.RegularExpressions.Regex * string * int * int * int * int * bool -> System.Text.RegularExpressions.Match
[<System.Obsolete("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Scan : System.Text.RegularExpressions.Regex * string * int * int * int * int * bool -> System.Text.RegularExpressions.Match
Protected Friend Function Scan (regex As Regex, text As String, textbeg As Integer, textend As Integer, textstart As Integer, prevlen As Integer, quick As Boolean) As Match

參數

regex
Regex

規則運算式引擎的執行個體。

text
String

進行模式比對所掃描的文字。

textbeg
Int32

規則運算式引擎掃描是否有相符項目的 text 中以零為起始的起始位置。

textend
Int32

規則運算式引擎掃描是否有相符項目的 text中以零為起始的結束位置。

textstart
Int32

用於掃描是否有此相符項目之以零為起始的起始位置。

prevlen
Int32

先前比對中的字元數。

quick
Boolean

true 可在快速模式搜尋相符項目;否則為 false

傳回

相符項目。

屬性

適用於

Scan(Regex, String, Int32, Int32, Int32, Int32, Boolean, TimeSpan)

Source:
RegexRunner.cs
Source:
RegexRunner.cs
Source:
RegexRunner.cs

警告

This API supports obsolete mechanisms for Regex extensibility. It is not supported.

CompileToAssembly 方法所產生的 Regex 物件使用。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

protected public:
 System::Text::RegularExpressions::Match ^ Scan(System::Text::RegularExpressions::Regex ^ regex, System::String ^ text, int textbeg, int textend, int textstart, int prevlen, bool quick, TimeSpan timeout);
protected internal System.Text.RegularExpressions.Match? Scan (System.Text.RegularExpressions.Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, TimeSpan timeout);
[System.Obsolete("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected internal System.Text.RegularExpressions.Match? Scan (System.Text.RegularExpressions.Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, TimeSpan timeout);
protected internal System.Text.RegularExpressions.Match Scan (System.Text.RegularExpressions.Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, TimeSpan timeout);
member this.Scan : System.Text.RegularExpressions.Regex * string * int * int * int * int * bool * TimeSpan -> System.Text.RegularExpressions.Match
[<System.Obsolete("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Scan : System.Text.RegularExpressions.Regex * string * int * int * int * int * bool * TimeSpan -> System.Text.RegularExpressions.Match
Protected Friend Function Scan (regex As Regex, text As String, textbeg As Integer, textend As Integer, textstart As Integer, prevlen As Integer, quick As Boolean, timeout As TimeSpan) As Match

參數

regex
Regex

規則運算式引擎的執行個體。

text
String

進行模式比對所掃描的文字。

textbeg
Int32

規則運算式引擎掃描是否有相符項目的 text 中以零為起始的起始位置。

textend
Int32

規則運算式引擎掃描是否有相符項目的 text中以零為起始的結束位置。

textstart
Int32

用於掃描是否有此相符項目之以零為起始的起始位置。

prevlen
Int32

先前比對中的字元數。

quick
Boolean

true 可在快速模式搜尋相符項目;否則為 false

timeout
TimeSpan

逾時間隔。

傳回

相符項目。

屬性

適用於