2026-10-29 14:12 UTC
they call it the best to ever do it
_TITLE_MATCH = re.compile(r"^\s*title\s[\"'](.*)[\"']$", re.MULTILINE), 1
_DESCRIPTION_MATCH = re.compile(r"(?sm)^\s*desc\s*['\"](.*?)['\"]"), 1
_CHECK_MATCH = re.compile(r"(?sm)^\s*desc\s*([\"'])check\1,\s*(%?q?[\"'\(])((?:(?!\2|\\).|\\.)*)(\)|\2)"), 3
_FIX_MATCH = re.compile(r"(?sm)^\s*desc\s*([\"'])fix\1,\s*(%?q?[\"'\(])((?:(?!\2|\\).|\\.)*)(\)|\2)"), 3
Replies (2)
-
@anfallsigelkott@tech.lgbt 2026-10-29 15:04
@thermia@sk.girlthi.ng I love regex :) The most readable thing invented :)
-
@prescientmoon@social.moonythm.dev 2026-10-29 14:28
@thermia@sk.girlthi.ng yum!