Regular Expressions 101

Community Patterns

123...6

Find Reddit Threads

10

Regular Expression
Python

r"
(^https?://)?(\w+)?\.?(reddit\.com/|redd\.it/)(r/\w+/)?(comments/)?(\w+)
"
gm

Description

Loading markdown...
Submitted by Mio - 9 years ago