Readonly
containerContainer that all the search results are appended to.
Readonly
matchesArray of positions of all the matches.
Readonly
regexCurrent regex used for searching.
If a match is selected and it's different to the provided string, it's replaced, else the index of the closest match is returned. If there's no selected match, the index of the closest match is returned.
Unhides the search container and highlights all matches of the specified string in the editor.
String to search for.
Optional
caseSensitive: booleanWhether or not the search is case sensetive.
Optional
wholeWord: booleanWhether or not matches must be surrounded by word boundries.
Optional
useRegExp: booleanIf true, special characters won't be escaped when creating the RegExp.
Optional
selection: [number, number]Boundries to search between. If excluded, all the code is searched.
Optional
filter: SearchFilterA function called for each match with the start and end positions of the match. If it returns false, the match won't be included.
Optional
wholeWordBoundry: RegExpPattern controlling the behavior of whole word search. Best left
undefined unless you know what you're doing. Does nothing if wholeWord
isn't set to true
.
Defaults to /[_\p{N}\p{L}]{2}/u
.
An error message if the RegExp was invalid.
Generated using TypeDoc
Object with methods useful for performing a search and both highlighting and replacing the matches.