woheller69/browser

java.util.regex.PatternSyntaxException: Error in {min,max} interval near index

Closed this issue · 8 comments

825i commented

I am getting this error when trying to run a script on a page:

WhatsApp Image 2023-12-13 at 11 32 56_f639a1d3

I don't get this error on any other browser. In fact the script also works fine on another browser that allows userscripts (Kiwi Browser).

Is there something on Free Browser that prevents my regex script from working?

P.S. According to this, this guy had some problem with his .json parser. I've run my userscript through dozens of linters and checkers and nothing has ever complained and as I said, other browsers have no problem with this script.

if you switch on Debug, does it show that your script is being executed? Or is this a problem with @match?

825i commented

I have debug switched on, that's what the toast is showing. So it is trying to execute the script but it's hitting that error and not working.

then it does not like your @match pattern...
how does that look like?

MatchPatterns.PDF
@match should look like specified here. http and https only

825i commented

The match pattern is fine. I think the problem is that @match does not support regex. Only @include works for that. So sadly I can't use this browser because none of my regex scripts work.

Please try this. No idea if it works.
If a @match pattern starts with "/" and ends with "/" it uses the pattern between as regex and does not convert it into a regex

app-release.apk.zip

Backup app data
Uninstall
Remove .zip and install

@825i Have you tried it?

@825i Do your scripts work with this version? Without testing it will not be part of the code...