, , with 'id' attribute; \3 is the match
+ pat1 = re.compile(r"""<(a|div|span)\s+[^>]*\bid=["'](page|pg)_?([\divxlcdm]+)["']""",
+ re.IGNORECASE)
+ # Alternately: look for span class=pagenum; \1 is the match
+ pat2 = re.compile(r"""]*\bclass=["']pagenum['"].*>([^<]+)=7.1.0
regex>=2019.4.12
+roman>=5.2