Closed Palloxin closed 8 months ago
I apologize for the inconvenience caused by the malfunction of the quantifier. I was unaware when the problem started, but I will try to work on this as soon as possible to find a solution.
Thank you for your feedback.
I also found that this doesnt work
regex: /(bbb)(?<=aaa\1)/
string: aaabbb
I was looking into these regular expressions, it seems a limitation in regex in Java:
java.util.regex.PatternSyntaxException: Look-behind pattern matches must have a bounded maximum length near index 8 (?<=\d+)Bob
If you use \d{1} inside the look-behind expression it works, but I am trying to find a solution. The error is happening only in the Android environment, I have added a test and it works correctly but when I execute in Android, it seems a limitation.
On the website regex101.com there is the same problem.
The lookbehind with quantifiers doesnt works but if i switch to ECMAScript (Javascript)
the quantifiers into look behind are accepted just fine.
Currently, RegexH is fully integrated with Java regex, which presents these limitations. Consequently, finding straightforward solutions appears challenging.
I am contemplating two potential approaches, although both require substantial refactoring:
I will persist in exploring these solutions, but please be aware that hits process is expected to be time-consuming.
For now, the solution will be shown in the explain section java errors, since this error is solved by limiting the range, for example instead of (<?+d), you can use (<?\d{1,8}), it will be not considered a specific bug of my app, but I have aggregated the errors in the explain to make it more clear to the user.
It will be added in version 5.0.2, it should be ready for the next week.
What about (a)(?<=\1)
?
string:
6Bob
It doesnt match in the app.The quantifiers not usable in them is really a big hole in the app.