^start of line
(*:>)marks this position as > so the matching path can be identified later
Positive Lookahead(?=(?(?=(\d(?:\ \?\ |(?1))\d))
(?(?=\1.)(*ACCEPT:<))
(?:(?=\d(\d*+\D++)(((?(3)\3))\d))
(?>(?=(\d)\2\4\5) |
(?:1\2\4[0]|2\2\4[01]|3\2\4[0-2]|4\2\4[0-3]|5\2\4[0-4]|6\2\4[0-5]|7\2\4[0-6]|8\2\4[0-7]|9)(*ACCEPT) |
(*ACCEPT:<))
.)++(*ACCEPT:=)
)) Condition(?(?=(\d(?:\ \?\ |(?1))\d))
(?(?=\1.)(*ACCEPT:<))
(?:(?=\d(\d*+\D++)(((?(3)\3))\d))
(?>(?=(\d)\2\4\5) |
(?:1\2\4[0]|2\2\4[01]|3\2\4[0-2]|4\2\4[0-3]|5\2\4[0-4]|6\2\4[0-5]|7\2\4[0-6]|8\2\4[0-7]|9)(*ACCEPT) |
(*ACCEPT:<))
.)++(*ACCEPT:=)
) Uses the first branch if the lookaround matches
Positive Lookahead(?=(\d(?:\ \?\ |(?1))\d)) Group 1(\d(?:\ \?\ |(?1))\d) \da digit
Non-Capturing Group(?:\ \?\ |(?1)) \ the literal (3210 / 408 / 2016)
\?the literal ? (6310 / 778 / 3F16)
\ the literal (3210 / 408 / 2016)
(?1)calls group 1 as a subroutine
\da digit
If the condition is true, match this branch:
(?(?=\1.)(*ACCEPT:<))
(?:(?=\d(\d*+\D++)(((?(3)\3))\d))
(?>(?=(\d)\2\4\5) |
(?:1\2\4[0]|2\2\4[01]|3\2\4[0-2]|4\2\4[0-3]|5\2\4[0-4]|6\2\4[0-5]|7\2\4[0-6]|8\2\4[0-7]|9)(*ACCEPT) |
(*ACCEPT:<))
.)++(*ACCEPT:=)
Condition(?(?=\1.)(*ACCEPT:<)) Uses the first branch if the lookaround matches
Positive Lookahead(?=\1.) \1the text saved by group 1
.any character (except for line terminators)
If the condition is true, match this branch:(*ACCEPT:<) (*ACCEPT:<)immediately succeeds the current match or subroutine; inside an assertion, resolves it according to whether it is positive or negative; records < as the mark name for this matching path
Non-Capturing Group(?:(?=\d(\d*+\D++)(((?(3)\3))\d))
(?>(?=(\d)\2\4\5) |
(?:1\2\4[0]|2\2\4[01]|3\2\4[0-2]|4\2\4[0-3]|5\2\4[0-4]|6\2\4[0-5]|7\2\4[0-6]|8\2\4[0-7]|9)(*ACCEPT) |
(*ACCEPT:<))
.)++ ++repeats the group contents below at least once:
Positive Lookahead(?=\d(\d*+\D++)(((?(3)\3))\d)) \da digit
\d*+a digit, repeated any number of times
\D++any character that's not a digit, repeated at least once
Uses the first branch if group 3 matched
If the condition is true, match this branch:\3 \3the text saved by group 3
\da digit
Atomic Group(?>(?=(\d)\2\4\5) |
(?:1\2\4[0]|2\2\4[01]|3\2\4[0-2]|4\2\4[0-3]|5\2\4[0-4]|6\2\4[0-5]|7\2\4[0-6]|8\2\4[0-7]|9)(*ACCEPT) |
(*ACCEPT:<)) 1st Alternative(?=(\d)\2\4\5) Positive Lookahead(?=(\d)\2\4\5) \2the text saved by group 2
\4the text saved by group 4
\5the text saved by group 5
2nd Alternative
(?:1\2\4[0]|2\2\4[01]|3\2\4[0-2]|4\2\4[0-3]|5\2\4[0-4]|6\2\4[0-5]|7\2\4[0-6]|8\2\4[0-7]|9)(*ACCEPT) Non-Capturing Group(?:1\2\4[0]|2\2\4[01]|3\2\4[0-2]|4\2\4[0-3]|5\2\4[0-4]|6\2\4[0-5]|7\2\4[0-6]|8\2\4[0-7]|9) 1the literal 1 (4910 / 618 / 3116)
\2the text saved by group 2
\4the text saved by group 4
3rd Alternative3\2\4[0-2] 4th Alternative4\2\4[0-3] 5th Alternative5\2\4[0-4] 6th Alternative6\2\4[0-5] 7th Alternative7\2\4[0-6] 8th Alternative8\2\4[0-7] (*ACCEPT)immediately succeeds the current match or subroutine; inside an assertion, resolves it according to whether it is positive or negative
3rd Alternative
(*ACCEPT:<) .any character (except for line terminators)
(*ACCEPT:=)immediately succeeds the current match or subroutine; inside an assertion, resolves it according to whether it is positive or negative; records = as the mark name for this matching path
.*?any character (except for line terminators), repeated any number of times
\Kresets the starting point of the reported match. Any previously consumed characters are no longer included in the final match
\?the literal ? (6310 / 778 / 3F16)
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