21
22
constructor(searchString: string, isRegex: boolean, matchCase: boolean, wordSeparators: string | null) {
24
>
this.isRegex = isRegex;
25
>
this.matchCase = matchCase;
26
>
this.wordSeparators = wordSeparators;
27
>
}
28
29
public parseSearchRequest(): SearchData | null {
31
return null;
32
}
34
>
// Try to create a RegExp out of the params
35
>
let multiline: boolean;
36
>
if (this.isRegex) {
37
multiline = isMultilineRegexSource(this.searchString);
39
multiline = (this.searchString.indexOf('\n') >= 0);
40
}
42
>
let regex: RegExp | null = null;
43
>
try {
44
>
regex = strings.createRegExp(this.searchString, this.isRegex, {
45
>
matchCase: this.matchCase,
46
>
wholeWord: false,
47
>
multiline: multiline,
48
>
global: true,
49
>
unicode: true
50
>
});
51
>
} catch (err) {
52
return null;
53
}