Method FindBetween
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
PageElementThe page to search. Must not be
null
.startQuery
stringThe starting anchor text. Must not be
null
.endQuery
stringThe ending anchor text. Must not be
null
.options
BetweenOptionsBetween options controlling inclusivity and boundaries. May be
null
for defaults.
Returns
Exceptions
- ArgumentNullException
Thrown when
page
,startQuery
, orendQuery
isnull
.
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
stringStarting anchor text. Must not be
null
.endQuery
stringEnding anchor text. Must not be
null
.options
BetweenOptionsBetween 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
, orendQuery
isnull
.