working on a project right now where we have large amount of text strings that we must localize phone numbers and make them clickable for android phones.
The phone n
Perhaps something like this:
/(\+\d+)?\s*(\(\d+\))?([\s-]?\d+)+/
(\+\d+)? = A "+" followed by one or more digits (optional)\s* = Any number of space characters (optional)(\(\d+\))? = A "(" followed by one or more digits followed by ")" (optional)([\s-]?\d+)+ = One or more set of digits, optionally preceded by a space or dashTo be honest, though, I doubt that you'll find a one-expression-to-rule-them-all. Telephone numbers can be in so many different formats that it's probably impractical to match any possible format with no false positives or negatives.