I would like to extract these phone number patterns using regex:
xxx.xxx.xxx, xxx-xxx-xxx, (xxx)xxx-xxxx, or (xxx) xxx-xxxx
I've done this:
preg_match_all('/\b[0-9]{3}\s*-\s*[0-9]{3}\s*-\s*[0-9]{4}\b/',$output,$matches);
But it only matches xxx-xxx-xxx your help would be appreciated. thanks!