Method FindRegex
FindRegex(DomNode, string, FindOptions?)
Finds every match of a regular expression.
public static IReadOnlyList<TextMatch> FindRegex(this DomNode root, string pattern, FindOptions? options = null)
Parameters
rootDomNodeThe document or subtree to search.
patternstringThe pattern.
optionsFindOptionsThe search options, or null for the defaults. The regex timeout is enforced.
Returns
- IReadOnlyList<TextMatch>
The matches, in document order.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The pattern is not a valid regular expression.
- RegexMatchTimeoutException
A match attempt exceeded RegexTimeout.