pull/48/head
kunfei 5 years ago
parent 74993fb737
commit 35c9a139b1
  1. 11
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt

@ -436,8 +436,15 @@ class AnalyzeRule(private var book: BaseBook? = null) {
//分离put //分离put
rule = splitPutRule(rule, putMap) rule = splitPutRule(rule, putMap)
//分离正则表达式 //分离正则表达式
val ruleStrS = rule.trim { it <= ' ' }.split("##") val index = rule.indexOf("}}")
rule = ruleStrS[0] var rule1 = ""
var rule2 = rule
if (index > 0) {
rule1 = rule.substring(0, index)
rule2 = rule.substring(index)
}
val ruleStrS = rule2.trim { it <= ' ' }.split("##")
rule = rule1 + ruleStrS[0]
if (ruleStrS.size > 1) { if (ruleStrS.size > 1) {
replaceRegex = ruleStrS[1] replaceRegex = ruleStrS[1]
} }

Loading…
Cancel
Save