1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-31 09:58:01 +00:00

Fix backtracking issue with regex (#5401)

There was an unnecessary
This commit is contained in:
Dyllon Gagnier
2021-01-29 07:26:25 -08:00
committed by GitHub
parent a360adbba9
commit 3eefb3cce6

View File

@@ -78,7 +78,7 @@ function parseFilterOperation(operators,filterString,p) {
nextBracketPos = filterString.indexOf(">",p);
break;
case "/": // regexp brackets
var rex = /^((?:[^\\\/]*|\\.)*)\/(?:\(([mygi]+)\))?/g,
var rex = /^((?:[^\\\/]|\\.)*)\/(?:\(([mygi]+)\))?/g,
rexMatch = rex.exec(filterString.substring(p));
if(rexMatch) {
operator.regexp = new RegExp(rexMatch[1], rexMatch[2]);