Finds a text pattern by regular expression.
Namespace: Sgry.AzukiAssembly: Azuki (in Azuki.dll) Version: 1.7.13.40248
Syntax
C# |
---|
public SearchResult FindNext( Regex regex, int begin, int end ) |
Visual Basic |
---|
Public Function FindNext ( regex As Regex, begin As Integer, end As Integer ) As SearchResult |
Parameters
- regex
- Type: System.Text.RegularExpressions..::..Regex
A Regex object expressing the text pattern to find.
- begin
- Type: System..::..Int32
The begin index of the search range.
- end
- Type: System..::..Int32
The end index of the search range.
Return Value
Type: SearchResultSearch result object if found, otherwise null if not found.
Remarks
This method finds the first ocurrence of a pattern expressed by a regular expression in the range of [begin, end). The text matching process continues for the index specified with the end parameter and does not stop at line ends nor null-characters.
RegexOptions.RightToLeft option MUST NOT be set to the Regex object given as parameter regex otherwise an ArgumentException will be thrown.
If an empty string was used for a regular expression pattern, search result will be the range of [begin, begin).
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentException | Parameter regex is a Regex object with RegexOptions.RightToLeft option. |
System..::..ArgumentNullException | Parameter regex is null. |
System..::..ArgumentOutOfRangeException | Parameter begin or end is out of valid range. |