Regular Expressions 101

Community Patterns

Community Library Entry

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 - 4 years ago