Next / Previous / Contents / Shipman's homepage

5.2. YEAR_PAT: Year directory name pattern

Matches directory names with four digits.

birdnotes.py
YEAR_PAT = re.compile(
    r'[12]'          # Matches 1 or 2
    r'\d{3}'         # Matches three digits
    r'$')            # End anchor: insure a complete match