This is the regular expression I use to match phone numbers like:
00 00 00 00 00
00 00 0 00 00 00 00
+00 0 00 00 00 00
(\\d{2}\\s+\\d{2}\\s+\\d{2}\\s+\\d{2}
Where you have your alternative formats listed like:
(...)\s+(...)\s+(...)
Change that to use the |
(OR) operator:
(...)|(...)|(...)
Don't escape the parentheses. \(
and \)
should be simply (
and )
.
In your third group the +
at the beginning should be escaped with a backslash:
(\+\d{2}\s+\d\s+\d{2}\s+\d{2}\s+\d{2}\s+\d{2})