0

I need to find phone number in nsstring without white spaces.
I use regular: ^\\+[1-9]{1}[0-9]{3,14}$.
It works when i have string with phone number only - 345908233.
But when i have a string - sdkaflfnsdfhgiusafusfbuosb345908233fkjsadfnksjfnas it doesn't work.

Could you help me please?

Didier Aupest
  • 3,227
  • 2
  • 23
  • 35
ankmara
  • 265
  • 3
  • 13

1 Answers1

0

Remove ^ and $ form your regex. \+[1-9]{1}[0-9]{3,14}

Sam FarajpourGhamari
  • 14,601
  • 4
  • 52
  • 56