^start of line
Non-Capturing Group(?:(\d+)\sYears?)? ?repeats the group contents below at most once:
\d+a digit, repeated at least once
\sany whitespace character
Yearthe literal text Year (case insensitive) s?optionally matches the literal s (11510 / 1638 / 7316) (case insensitive)
,?optionally matches the literal , (4410 / 548 / 2C16)
\s?optionally matches any whitespace character
Non-Capturing Group(?:and\s)? ?repeats the group contents below at most once:
andthe literal text and (case insensitive) \sany whitespace character
Non-Capturing Group(?:(\d+)\sMonths?)? ?repeats the group contents below at most once:
\d+a digit, repeated at least once
\sany whitespace character
Monththe literal text Month (case insensitive) s?optionally matches the literal s (11510 / 1638 / 7316) (case insensitive)
,?optionally matches the literal , (4410 / 548 / 2C16)
\s?optionally matches any whitespace character
Non-Capturing Group(?:and\s)? ?repeats the group contents below at most once:
andthe literal text and (case insensitive) \sany whitespace character
Non-Capturing Group(?:(\d+)\sDays?)? ?repeats the group contents below at most once:
\d+a digit, repeated at least once
\sany whitespace character
Daythe literal text Day (case insensitive) s?optionally matches the literal s (11510 / 1638 / 7316) (case insensitive)
$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
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters