0

i'm having a problem with Regex, this Regex works fine in other browsers but Safari doesn't, i get the error "invalid regular expression invalid group specifier name" Please help me convert this Regex, i'm trying to get the phone number from the string

var str = '@' + str;
var obj =  str.match(/(?<=\D)(01|02|03|04|05|06|07|08|09)[0-9\,\s.-]{8,11}/gm);
colinmorgan
  • 55
  • 1
  • 6
  • I got the same error, but I am confused with the code, I have just learned regex, can you help me convert the code so it works on safari? – colinmorgan Jul 07 '20 at 02:54
  • Please try this `\D(01|02|03|04|05|06|07|08|09)[0-9\,\s.-]{8,11}` –  Jul 07 '20 at 03:38

0 Answers0