^start of line
Comment: Start of string
Non-Capturing Group(?: # A container group:
(\+49|0049|\+\(49\)|\(\+49\))? [ ()\/-]* # German: country code
(?(1)|0)1(?:5[12579]|6[023489]|7[0-9]) # trunk prefix and company code
| # or
(\+43|0043|\+\(43\)|\(\+43\))? [ ()\/-]* # Austrian: country code
(?(2)|0)6(?:64|(?:50|6[0457]|7[0678]|8[0168]|9[09])) # trunk prefix and company code
) 1st Alternative # A container group:
(\+49|0049|\+\(49\)|\(\+49\))? [ ()\/-]* # German: country code
(?(1)|0)1(?:5[12579]|6[023489]|7[0-9]) # trunk prefix and company code
Comment: A container group:
Group 1(\+49|0049|\+\(49\)|\(\+49\))? ?repeats the group contents below at most once:
\+the literal + (4310 / 538 / 2B16)
0049the literal text 0049 \+the literal + (4310 / 538 / 2B16)
\(the literal ( (4010 / 508 / 2816)
\)the literal ) (4110 / 518 / 2916)
\(the literal ( (4010 / 508 / 2816)
\+the literal + (4310 / 538 / 2B16)
\)the literal ) (4110 / 518 / 2916)
*matches any number of characters from the set below:
the literal (3210 / 408 / 2016)
(the literal ( (4010 / 508 / 2816)
)the literal ) (4110 / 518 / 2916)
\/the literal / (4710 / 578 / 2F16)
-the literal - (4510 / 558 / 2D16)
Comment: German: country code
Uses the first branch if group 1 matched
If the condition is true, match this branch: — matches an empty string
Otherwise, match this branch:0 0the literal 0 (4810 / 608 / 3016)
1the literal 1 (4910 / 618 / 3116)
Non-Capturing Group(?:5[12579]|6[023489]|7[0-9]) 5the literal 5 (5310 / 658 / 3516)
1the literal 1 (4910 / 618 / 3116)
2the literal 2 (5010 / 628 / 3216)
5the literal 5 (5310 / 658 / 3516)
7the literal 7 (5510 / 678 / 3716)
9the literal 9 (5710 / 718 / 3916)
6the literal 6 (5410 / 668 / 3616)
0the literal 0 (4810 / 608 / 3016)
2the literal 2 (5010 / 628 / 3216)
3the literal 3 (5110 / 638 / 3316)
4the literal 4 (5210 / 648 / 3416)
8the literal 8 (5610 / 708 / 3816)
9the literal 9 (5710 / 718 / 3916)
7the literal 7 (5510 / 678 / 3716)
0-9one character from 0 (4810) to 9 (5710)
Comment: trunk prefix and company code
2nd Alternative # or
(\+43|0043|\+\(43\)|\(\+43\))? [ ()\/-]* # Austrian: country code
(?(2)|0)6(?:64|(?:50|6[0457]|7[0678]|8[0168]|9[09])) # trunk prefix and company code
Comment: or
Group 2(\+43|0043|\+\(43\)|\(\+43\))? ?repeats the group contents below at most once:
\+the literal + (4310 / 538 / 2B16)
0043the literal text 0043 \+the literal + (4310 / 538 / 2B16)
\(the literal ( (4010 / 508 / 2816)
\)the literal ) (4110 / 518 / 2916)
\(the literal ( (4010 / 508 / 2816)
\+the literal + (4310 / 538 / 2B16)
\)the literal ) (4110 / 518 / 2916)
*matches any number of characters from the set below:
the literal (3210 / 408 / 2016)
(the literal ( (4010 / 508 / 2816)
)the literal ) (4110 / 518 / 2916)
\/the literal / (4710 / 578 / 2F16)
-the literal - (4510 / 558 / 2D16)
Comment: Austrian: country code
Uses the first branch if group 2 matched
If the condition is true, match this branch: — matches an empty string
Otherwise, match this branch:0 6the literal 6 (5410 / 668 / 3616)
Non-Capturing Group(?:64|(?:50|6[0457]|7[0678]|8[0168]|9[09])) Comment: trunk prefix and company code
Comment: zero or more spaces, parens, / and -
\da Unicode decimal digit
Non-Capturing Group(?:[ \/-]*\d){6,7} Comment: a digit and then six or seven occurrences of space, / or - and a digit
\s*a Unicode whitespace character, repeated any number of times
Comment: zero or more whites
$end of line
Comment: end of string
g modifier: global. Finds all matches instead of stopping after the first
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
x modifier: extended. Ignores unescaped whitespace and comments outside character classes