Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
discord(?:app)?\.com\/(?:(friend-)?invite|servers)?\/([a-z0-9\-]+)|discord\.gg\/(?:\S+\/)?([a-z0-9\-]+)
/
gm

Description

Can match 7 variations of invites (the page discord.com/servers/ is included)

Submitted by Diso - 2 years ago