Table of Contents

Method FindRegex

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

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

root DomNode

The document or subtree to search.

pattern string

The pattern.

options FindOptions

The 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.