kevinkhan
01-06-2010, 02:01 PM
I have a regular expression to match numbers in this format
087xxxxxxx
086xxxxxxx
085xxxxxxx
083xxxxxxx
(087) xxxxxxx
(087)xxxxxxx
( 087 )xxxxxxx
( 087 ) xxxxxxx
087 xxxxxxx
087-xxxxxxx
087 - xxxxxxx
#([( ]{0,2}08[3567])[) -]{0,3}([0-9]{7})#
How do i write a regex to take numbers in the above formats but not numbers that have a digit repeated more than 4 times like this
0879811111
Thanks
087xxxxxxx
086xxxxxxx
085xxxxxxx
083xxxxxxx
(087) xxxxxxx
(087)xxxxxxx
( 087 )xxxxxxx
( 087 ) xxxxxxx
087 xxxxxxx
087-xxxxxxx
087 - xxxxxxx
#([( ]{0,2}08[3567])[) -]{0,3}([0-9]{7})#
How do i write a regex to take numbers in the above formats but not numbers that have a digit repeated more than 4 times like this
0879811111
Thanks