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
pagePageElementThe page to search. Must not be
null.startQuerystringThe starting anchor text. Must not be
null.endQuerystringThe ending anchor text. Must not be
null.optionsBetweenOptionsBetween options controlling inclusivity and boundaries. May be
nullfor defaults.
Returns
Exceptions
- ArgumentNullException
Thrown when
page,startQuery, orendQueryisnull.
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
pagesIEnumerable<PageElement>Pages to search. Must not be
null.startQuerystringStarting anchor text. Must not be
null.endQuerystringEnding anchor text. Must not be
null.optionsBetweenOptionsBetween options controlling inclusivity and boundaries. May be
nullfor 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, orendQueryisnull.