SearchQuery

constructor(search: String = "", caseSensitive: Boolean = false, literal: Boolean = false, regexp: Boolean = false, replace: String = "", wholeWord: Boolean = false, test: (from: DocPos, to: DocPos, state: EditorState) -> Boolean? = null)

Parameters

search

The search string.

caseSensitive

Whether matching is case-sensitive.

literal

If true, treat search as a literal string even if regexp is true.

regexp

If true and literal is false, treat search as a regex pattern.

replace

The replacement string.

wholeWord

If true, only match whole words.

test

Optional filter callback. When set, only matches for which test(from, to, state) returns true are included.