RegexRunner.Scan 方法  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
由 CompileToAssembly 方法生成的 Regex 对象使用。
重载
| Scan(ReadOnlySpan<Char>) | 由 Regex 对象用于扫描输入  | 
| 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> -> unitProtected 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.MatchProtected 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.MatchProtected 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
超时时间间隔。
返回
匹配项。
- 属性