Identifiersflags: g
Slack User Mention
Match Slack user mentions in their raw form <@U01234ABC> as delivered by the Events API.
Try it in RegexProPattern
regexJavaScript
/<@U[A-Z0-9]{8,}>/gRaw source: <@U[A-Z0-9]{8,}>
How it works
Literal <@U prefix, then 8 or more uppercase alphanumeric characters (Slack's ID alphabet), closed by >. Matches user IDs regardless of legacy or modern length.
Examples
Input
cc <@U01234ABC> please reviewMatches
<@U01234ABC>
Input
pinged <@UABCDEF123GH> earlierMatches
<@UABCDEF123GH>
Input
no mentionsNo match
—Common use cases
- Slack bot payload parsing
- Notification auditing
- @mention frequency analytics
- Channel migration tooling