Table of Contents

Method FindBetween

Namespace
LMKit.Document.Search
Assembly
LM-Kit.NET.dll

FindBetween(PageElement, string, string, BetweenOptions)

Extracts the text located between the first occurrence of startQuery and the first occurrence of endQuery. Can optionally include the anchors and cross line/block boundaries (within the same page).

public List<TextMatch> FindBetween(PageElement page, string startQuery, string endQuery, BetweenOptions options = null)

Parameters

page PageElement

The page to search. Must not be null.

startQuery string

The starting anchor text. Must not be null.

endQuery string

The ending anchor text. Must not be null.

options BetweenOptions

Between options controlling inclusivity and boundaries. May be null for defaults.

Returns

List<TextMatch>

Zero or more TextMatch ranges between the anchors (usually 0 or 1).

Exceptions

ArgumentNullException

Thrown when page, startQuery, or endQuery is null.

FindBetween(IEnumerable<PageElement>, string, string, BetweenOptions)

Extracts text located between the first occurrences of startQuery and endQuery within each page, across multiple pages. This overload does not span across page boundaries.

public List<TextMatch> FindBetween(IEnumerable<PageElement> pages, string startQuery, string endQuery, BetweenOptions options = null)

Parameters

pages IEnumerable<PageElement>

Pages to search. Must not be null.

startQuery string

Starting anchor text. Must not be null.

endQuery string

Ending anchor text. Must not be null.

options BetweenOptions

Between options controlling inclusivity and boundaries. May be null for defaults.

Returns

List<TextMatch>

All between-range matches where both anchors exist on the same page, with (TextMatch) and PageIndex set.

Exceptions

ArgumentNullException

Thrown when pages, startQuery, or endQuery is null.