Looking for reg.expression Ros.phone in the text of the groups VK

/((8|\+7)[\- ]?)?(\(?\d{3,5}\)?[\- ]?)[\d\- ]{5,10}/ui 

He always finds phones, but sometimes the first value is broken through digits from the link to users https://vk.com/id453338121 , which may be in the text. Tell me, how to exclude such moments?

  • one
    I do not like to make regulars) Two years ago I found this /^((8|\+)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/i , I still use it. It seems not to fail - Dantessss
  • Thanks, of course, but obviously didn’t study my question - Sarkis Allahverdian
  • one
    @SarkisAllahverdian in what sense is "clearly not studied"? Did you check what you were advised? Under the regulars that you advised, links to users do not fall. You can check, for example, here: regex101.com - nobody
  • Yes, removing ^ search began to work as it should. I apologize - Sarkis Allahverdian

0