I am trying to extract US only phone numbers from a string.
I have looked around the web/SO but have not found any suitable solution for my needs.
To be honest, I have 2.5 years of experience in Web Programming but I suck at RegEX.
Here is only RegEX I wrote (\d{3}+\-\d{3}+\-\d{4}+)
but it only detects 589-845-2889
Here are phone numbers I want to extract.
589-845-2889
(589)-845-2889
589.845.2889
589 845 2889
5898452889
(589) 845 2889
Please tell me how can I achieve this feat in single Regex for PHP.
EDIT:
If you feel any other format of US number a user can enter, also mention that as well, and include that in RegEX as well.
P.S:
Actually I am trying to scrape Craiglist and user may have posted their phone number in any possible format.