the original said reggae but i misread it as regex and got this idea lol

original comic artist: thisstupidtwink@insta

  • blueduck@piefed.social
    link
    fedilink
    English
    arrow-up
    6
    ·
    20 hours ago

    PCRE supports inline comments:

    foo(?# match literal foo)\d+
    

    Also verbose mode

    pattern = re.compile(r"""  
        ^               # start of string  
        [A-Z]{2}        # two uppercase letters  
        \d{4}           # four digits  
        $               # end of string  
    """, re.VERBOSE)