^start of line
\da digit
Positive Lookahead(?=(?:-?\d){7}-?\d-\d$) Non-Capturing Group(?:-?\d){7} {7}repeats the group contents below exactly 7 times:
-?optionally matches the literal - (4510 / 558 / 2D16)
\da digit
-?optionally matches the literal - (4510 / 558 / 2D16)
\da digit
-the literal - (4510 / 558 / 2D16)
\da digit
$end of line
\d*a digit, repeated any number of times
-the literal - (4510 / 558 / 2D16)
\d+a digit, repeated at least once
-the literal - (4510 / 558 / 2D16)
\d*a digit, repeated any number of times
\da digit
-the literal - (4510 / 558 / 2D16)
\da digit
$end of line
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