/\s\d{3,4}\s/ and print for 'abd 123 fred', '555-5555-6666', 'ab 12345 xd';; abd 123 fred