tags:

views:

64

answers:

1

I have a list of phone numbers that start with the below numbers and in different formats...i need to grab the numbers that start only with the below numbers/format using php......

020 8
07974 
+44 (0) 20
+44 0
440203

any help will be appreciated..

+3  A: 
/^(020 8|07974|\+44 \(0\) 20|\+44 0|440203).*/

if(preg_match("/^(020 8|07974|\+44 \(0\) 20|\+44 0|440203).*/",  $numbers[i])
  echo i + "th number is valid";
Amarghosh