5the literal 5 (5310 / 658 / 3516)
2the literal 2 (5010 / 628 / 3216)
(?P=m)the text saved by group m
5the literal 5 (5310 / 658 / 3516)
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