Test, validate and match regular expressions
This regex extracts pagination links from HTML fragments that contain 'mtg', an italic tag, and then a URL ending with 'page/<number>'. It captures the page number and the link text from anchor tags, making it useful for scraping multi-page listings or forums. The 'g' and 'm' flags allow it to match multiple occurrences across lines.