How to check if result is a mobile number?

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Реакции
26
Баллы
28
When scraping telephone numbers, I need to only collect mobile numbers that start with: 07.

Is it possible to check if a no begins with: 07? I suppose regex first two digits, then ensure that they match both 0 and 7.

Thanks.
 
Yes you can use regex for that. Without knowing more specific of what format you're looking for maybe this will get you going.

http://tobbe.co/regex
 
  • Спасибо
Реакции: shabbysquire
Thanks Tobbe. Just ran it through text processing > regex, then check for any results via the IF statement.

Another issue. Because UK mobile numbers are 11 digits in total, I need to grab only 11. I use this:

07.{9}

But my regex also matches with mob nos that are longer, like this example. It would be great to ignore any mob nos that exceed 11 digits.
 

The match can not be followed by any character or number.
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)