Support regular expressions that are strings in the query language
parent
ae2d636e80
commit
a0ac6e66f9
|
@ -249,6 +249,9 @@ function evalSimpleExpression(type: string, val1: any, val2: any, val3: any) {
|
|||
return val1 != val2;
|
||||
}
|
||||
case "=~": {
|
||||
if (typeof val2 === "string") {
|
||||
val2 = [val2, "i"];
|
||||
}
|
||||
if (!Array.isArray(val2)) {
|
||||
throw new Error(`Invalid regexp: ${val2}`);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue