Test, validate and match regular expressions
Matches colon-delimited tokens like :smile: or :thumbs_up:, capturing the inner text (one or more characters excluding whitespace and colons) in group 1. With the global flag it finds all occurrences in a string, and case-insensitivity accommodates variants like :SMILE:. Commonly used to detect emoji shortcodes in chat apps (Slack, Discord), Markdown parsers, or comment systems before rendering them as images or Unicode emoji.