Regular Expressions 101

Community Patterns

Discord links scam detector

1

Regular Expression
PCRE2 (PHP >=7.3)

/
\[(?:http(?:s)?(:\/\/)?)?(www\.)?discord\S*\]\(((?!discord)\S)*\)
/
gm

Description

This regex tries to mitigate some of the most common scam practices found in discord since the support of masking links.

Submitted by KifoPL - 3 months ago