legado
legado copied to clipboard
Regex
确认 / Assignments
- [X] 搜索现有issues,不存在相似或相关的issue / No similar or related issues
- [X] 最新测试版依然存在此问题 / Latest beta app does not work
- [X] 此问题和Xposed、Lsposed、Magisk、手机主题、浏览器插件等无关 / Make sure your machine is not touched by hook frameworks, plugins etc
问题描述 / Describe Bugs
Nothing much to describe, just wondering why the regex replacement doesn't work as intended.
复现步骤 / How to reproduce
Screenshot
确认 / Assignment
- [X] 已经提交复现所需要的附加资料 / Submit additions related with bugs
其他信息 / Additions
日志提交 / Relevant log output
java.lang.IllegalArgumentException: No capturing group in the pattern with the name 1:+Devil:devil at java.util.regex.Matcher.getMatchedGroupIndex(Matcher.java:1197) at java.util.regex.Matcher.group(Matcher.java:492) at java.util.regex.Matcher.appendEvaluated(Matcher.java:753) at java.util.regex.Matcher.appendReplacement(Matcher.java:717) at io.legado.app.utils.r0.invokeSuspend(SourceFile:69) at io.legado.app.utils.r0.invoke(SourceFile:2) at io.legado.app.utils.r0.invoke(SourceFile:1) at io.legado.app.help.coroutine.h.invokeSuspend(SourceFile:61) at o4.a.resumeWith(SourceFile:9) at kotlinx.coroutines.i0.run(SourceFile:128) at com.bumptech.glide.load.engine.a.run(SourceFile:194) at f6.k.run(SourceFile:3) at f6.b.run(SourceFile:99)
阅读版本 / Legado version
3.23.061622
Android版本 / Android version
11
机型 / Model
Galaxy m21
What is the regular syntax of ${1:+Devil:devil}
?
Is there any documentation about it?
Here's a documentation I found https://www.regexbuddy.com/manual.html#insertreplaceconditional
Regular expression engine do not support this feature
What does the engine support that could allow for replacement depending on the condition.
document https://developer.android.com/reference/java/util/regex/Pattern
i think the answer is no
由于长期没有状态更新,该问题将于5天后自动关闭。如有需要可重新打开。
Solved on discord