Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-07-09 17:24
Flavor·Python

r"
(```|`)(python)?\s*?\n?(from \S+ )?import \S+(\n.*?;)*\n((.*return \S+```)|(`return \S+`))
"
gm
Open regex in editor

Description

A regex that matches comments that adhere to the rules of r/ProgrammerHumor

Submitted by anonymous