Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

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

Description

Check links for reddit.com and redd.it

Submitted by adaragao - 9 months ago