Regular Expressions 101

Community Patterns

123...6

Discord ID:NAME#DISCRIM match

3

Regular Expression
PCRE2 (PHP >=7.3)

/
(?'ID'\d{15,23}):(?'NAME'.*?)#(?'DISCRIMINATOR'[0-9]{4})
/
gm

Description

For example, using Carl-bot to dump members of the @everyone role ordering highest of id: !dump @everyone %i:%u -o id

Example of return:

498984530968051713:lanjt#2129
...

Matches with group ID, group NAME and group DISCRIMINATOR.

Submitted by lanjt - 3 years ago