2

I am running an android app in React native. Since I use regex when I run the app Invalid regular expression: Invalid group specifier name I get an error saying no stack.

Looking for a problem, it say this is look behind problem.

then how can i change my regex?

this is my regex

let regex = /^\.|\.$|(?<=\..*)\.|[^\d.]/g;

How can I resolve this problem?

user15322469
  • 841
  • 1
  • 8
  • 31
  • 1
    what does `change the value of the sharedBlacklist array` have to do with supposedly invalid regex (which seems to be a valid regular expression) - unless it needs to be a valid Java regex (because of the native part of react-native) - then, you'll need to change the regex to be valid Java regex? – Bravo Jun 23 '22 at 06:29
  • Does this answer your question? https://stackoverflow.com/questions/56990784/no-stack-reason-unhandled-js-exception-invalid-regular-expression-invalid I think that version of android does not support negative look behinds in regular expressions. – Alex Wayne Jun 23 '22 at 06:31
  • @AlexWayne How can i chage regex instead of my regex? – user15322469 Jun 23 '22 at 06:38

0 Answers0