?php preg_match_all ("/ \(? (\d{3})?\)? (?(1) [\-\s]) \d{3}-\d{4} / x", "Call 555-1212 or 1-800-555-1212", $phones);?
Returns the number of full pattern matches (which might be zero), or FALSE if an error occurred.