Method FindRegex
FindRegex(PageElement, string, RegexSearchOptions)
Finds regular expression matches within a page's text and returns layout-aware results. The regex runs over the normalized page text (options are applied to the text, not the pattern).
public List<TextMatch> FindRegex(PageElement page, string pattern, RegexSearchOptions regexOptions = null)
Parameters
pagePageElementThe page to search. Must not be
null.patternstringRegular expression pattern. Must not be
null.regexOptionsRegexSearchOptionsRegex options (e.g., case-insensitive), maximum results, and context size. May be
nullfor defaults.
Returns
Exceptions
- ArgumentNullException
Thrown when
pageorpatternisnull.
FindRegex(IEnumerable<PageElement>, string, RegexSearchOptions)
Finds regular expression matches across multiple pages.
public List<TextMatch> FindRegex(IEnumerable<PageElement> pages, string pattern, RegexSearchOptions regexOptions = null)
Parameters
pagesIEnumerable<PageElement>Pages to search. Must not be
null.patternstringRegular expression pattern. Must not be
null.regexOptionsRegexSearchOptionsRegex search options. May be
nullfor defaults.
Returns
Exceptions
- ArgumentNullException
Thrown when
pagesorpatternisnull.