Regular Expressions 101

Community Library

Community Library Entry

0

Regular ExpressionOpen Workspace

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

Description
Created·2023-07-09 17:24
Type·Match
Flavor·Python

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

Submitted by Anonymous
Open Workspace