Next / Previous / Contents / Shipman's homepage

5.3. YYYY_MM_XML_PAT: Month file name pattern

Matches the name of a month file.

birdnotes.py
YYYY_MM_XML_PAT = re.compile(
    r'[12]'          # Matches 1 or 2
    r'\d{3}'         # Matches three digits
    r'\-'            # Matches a hyphen
    r'[01]'          # Matches 0 or 1
    r'\d'            # Matches any digit
    r'\.xml'         # Matches a period followed by 'xml'
    r'$')            # End anchor, insure a full match