Test, validate and match regular expressions
This JavaScript regex matches emoji short-codes (like `:smile:` or `:+1:`) that are followed by a space, specific punctuation, or the end of a line. It uses a positive lookahead to ensure the short-code acts as a distinct token, preventing accidental matches within URLs or other text. It is ideal for parsing chat applications, social media feeds, or markdown to render text-based emojis.