|
|
@ -451,6 +451,9 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions { |
|
|
|
var tmp: String |
|
|
|
var tmp: String |
|
|
|
val evalMatcher = evalPattern.matcher(rule) |
|
|
|
val evalMatcher = evalPattern.matcher(rule) |
|
|
|
while (evalMatcher.find()) { |
|
|
|
while (evalMatcher.find()) { |
|
|
|
|
|
|
|
if (mode != Mode.Js) { |
|
|
|
|
|
|
|
mode = Mode.Regex |
|
|
|
|
|
|
|
} |
|
|
|
if (evalMatcher.start() > start) { |
|
|
|
if (evalMatcher.start() > start) { |
|
|
|
tmp = rule.substring(start, evalMatcher.start()) |
|
|
|
tmp = rule.substring(start, evalMatcher.start()) |
|
|
|
splitRegex(tmp) |
|
|
|
splitRegex(tmp) |
|
|
@ -483,9 +486,6 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions { |
|
|
|
val ruleStrArray = ruleStr.split("##") |
|
|
|
val ruleStrArray = ruleStr.split("##") |
|
|
|
val regexMatcher = regexPattern.matcher(ruleStrArray[0]) |
|
|
|
val regexMatcher = regexPattern.matcher(ruleStrArray[0]) |
|
|
|
while (regexMatcher.find()) { |
|
|
|
while (regexMatcher.find()) { |
|
|
|
if (mode != Mode.Js) { |
|
|
|
|
|
|
|
mode = Mode.Regex |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (regexMatcher.start() > start) { |
|
|
|
if (regexMatcher.start() > start) { |
|
|
|
tmp = ruleStr.substring(start, regexMatcher.start()) |
|
|
|
tmp = ruleStr.substring(start, regexMatcher.start()) |
|
|
|
ruleType.add(0) |
|
|
|
ruleType.add(0) |
|
|
|