FindOptions controls how the find and replace methods match text. The search is case sensitive by default. WholeWord matches whole words only, UseRegularExpressions treats the search text as a regular expression and substitutes group references such as $1 in the replacement text, UseWildcards enables the wildcards *, ? and [ ], Scope restricts the search to parts of the document and MaxResults limits the number of matches.
Independently of the options, a space element, a tab and a line break count as characters of the paragraph text (spaces, \t and \n), so a search text may contain them and a match may span them, and the text a field displays is found but never replaced. The paragraph mark is the character \r. A search text that contains it is matched against the consecutive paragraphs and headings of a body, a section, a list item, a table cell, a text box, a note or a header as one text in which every paragraph ends with \r: "a\rb" finds "a" at the end of one paragraph followed by "b" at the start of the next, and "\r\r" finds an empty paragraph. Any other search text is matched against each paragraph on its own, so ^ and $ in a regular expression still mean the start and the end of a paragraph. A replacement that covers a paragraph mark joins the paragraphs, which keep the kind and the style of the first one, and \r in a replacement text splits a paragraph or a heading. The last paragraph mark of a body, a cell or a text box cannot be deleted, and a match that starts or ends inside a hyperlink or another element nested in a span is not joined.