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

original comic artist: thisstupidtwink@insta

you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 1 month 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)
  • source
  • parent