Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic

C#
Visual Basic

Azuki 1.7 Documentation
Document..::..FindNext Method (Regex, Int32)
Document Class See Also Send Feedback

Finds a text pattern by regular expression.

Namespace: Sgry.Azuki
Assembly: Azuki (in Azuki.dll) Version: 1.7.13.40248

# Syntax

C#
    public SearchResult FindNext(
    	Regex regex,
    	int startIndex
    )

Visual Basic
    Public Function FindNext (
    	regex As Regex,
    	startIndex As Integer
    ) As SearchResult

#### Parameters

regex
  Type: System.Text.RegularExpressions..::..Regex
  A Regex object expressing the text pattern.

startIndex
  Type: System..::..Int32
  The search starting position.

#### Return Value

Type: SearchResult
Search result object if found, otherwise null if not found.

# Remarks

This method finds a text pattern expressed by a regular expression in the range of [startIndex, EOD) where EOD means the end-of-document. The text matching process continues for the index specified with the end parameter and does not stop at line ends nor null-characters. If the search range should end before EOD, use other overload method.

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 [startIndex, startIndex). The text matching process continues for the end of document and does not stop at line ends nor null-characters.

# Exceptions

Exception | Condition
--- | ---
System..::..ArgumentException | Parameter regex is a Regex object with RegexOptions.RightToLeft option.
System..::..ArgumentNullException | Parameter regex is null.

# See Also

Document Class
Document..::..Document Members
FindNext Overload
Sgry.Azuki Namespace