Regular Expressions 101

Community Patterns

Discord role/ping/channel catcher

0

Regular Expression
ECMAScript (JavaScript)

/
<(?:@[!&]?|#)\d+>
/
g

Description

This regex will match when people ping someone or ping a group it will also match when people mention a channel

for non-channel catching type use <@[!&]?\d+>

Submitted by The Detenator#4604 - 3 years ago