httpthe literal text http (case sensitive) s?optionally matches the literal s (11510 / 1638 / 7316) (case sensitive)
:the literal : (5810 / 728 / 3A16)
\/the literal / (4710 / 578 / 2F16)
\/the literal / (4710 / 578 / 2F16)
cdnthe literal text cdn (case sensitive) \.the literal . (4610 / 568 / 2E16)
mediathe literal text media (case sensitive) \.the literal . (4610 / 568 / 2E16)
3rd Alternative — matches an empty string
discordthe literal text discord (case sensitive) ?repeats the group contents below at most once:
appthe literal text app (case sensitive) \.the literal . (4610 / 568 / 2E16)
comthe literal text com (case sensitive) netthe literal text net (case sensitive) \/the literal / (4710 / 578 / 2F16)
Non-Capturing Group(?:attachments\/(\d+)\/(\d+)\/([^\s?]+)(\?[^\s]+)?|users\/\d+|channels\/(\d+)(?:\/(\d+)){0,2}) 1st Alternativeattachments\/(\d+)\/(\d+)\/([^\s?]+)(\?[^\s]+)? attachmentsthe literal text attachments (case sensitive) \/the literal / (4710 / 578 / 2F16)
\d+a digit, repeated at least once
\/the literal / (4710 / 578 / 2F16)
\d+a digit, repeated at least once
\/the literal / (4710 / 578 / 2F16)
Negated Character Class[^\s?]+ +matches at least one character outside the set below:
\sany whitespace character
?the literal ? (6310 / 778 / 3F16)
?repeats the group contents below at most once:
\?the literal ? (6310 / 778 / 3F16)
Negated Character Class[^\s]+ +matches at least one character outside the set below:
\sany whitespace character
2nd Alternativeusers\/\d+ usersthe literal text users (case sensitive) \/the literal / (4710 / 578 / 2F16)
\d+a digit, repeated at least once
3rd Alternativechannels\/(\d+)(?:\/(\d+)){0,2} channelsthe literal text channels (case sensitive) \/the literal / (4710 / 578 / 2F16)
\d+a digit, repeated at least once
Non-Capturing Group(?:\/(\d+)){0,2} {0,2}repeats the group contents below between 0 and 2 times:
\/the literal / (4710 / 578 / 2F16)
\d+a digit, repeated at least once
g modifier: global. Finds all matches instead of stopping after the first