Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
r/ProgrammerHumor comment regex
Open Workspace
Python
Match
Created 2023-07-09 17:24
0
Regular Expression
r"
(
```
|
`
)(
python
)?
\s
*?
\n
?
(
from
\S
+
)?
import
\S
+
(
\n.
*?
;
)*
\n
(
(
.
*
return
\S
+
```
)
|
(
`return
\S
+
`
)
)
"
gm
Description
A regex that matches comments that adhere to the rules of r/ProgrammerHumor
Submitted by
Anonymous