code: def match_pagination(ref_line):
      
      pattern = ur'\(?\[?(\d{1,4})\]?\)?\.?\s*$'
      re_footer = re.compile(pattern, re.UNICODE)
      match = re_footer.match(ref_line)
      if match:
          return int(match.group(1))
      return None
docs: Remove footer pagination from references lines