I am trying to match phone numbers in the following patterns:
9 99 99 99 99
0999999999
11 0999999999
9 9999 9999
But not the following:
9 99 99 99 99 (two spaces)
9 99\n99 99 99
Therefore, I want to match 7 to 12 digits and an optional spaces between them, but not sequences of more than one white space.
So far I came up with "[\d ?]{7,12}", but it doesn't really match the requirements as the spaces are counted in the {7,12} and it also matches two sequences of spaces.