Class DiscordRegexPattern


  • public class DiscordRegexPattern
    extends java.lang.Object
    This class contains some useful precompiled regex patterns.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.regex.Pattern CHANNEL_MENTION
      A pattern which checks for mentioned channels (e.g.
      static java.util.regex.Pattern CUSTOM_EMOJI
      A pattern which checks for custom emojis (e.g.
      static java.util.regex.Pattern MESSAGE_LINK
      A pattern which checks for message links (e.g.
      static java.util.regex.Pattern ROLE_MENTION
      A pattern which checks for mentioned roles (e.g.
      static java.util.regex.Pattern SNOWFLAKE
      A pattern to match snowflakes.
      static java.util.regex.Pattern USER_MENTION
      A pattern which checks for mentioned users (e.g.
      static java.util.regex.Pattern WEBHOOK_URL
      A pattern which checks for webhook urls (e.g.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • USER_MENTION

        public static final java.util.regex.Pattern USER_MENTION
        A pattern which checks for mentioned users (e.g. <@1234567890>).
      • ROLE_MENTION

        public static final java.util.regex.Pattern ROLE_MENTION
        A pattern which checks for mentioned roles (e.g. <@&1234567890>).
      • CHANNEL_MENTION

        public static final java.util.regex.Pattern CHANNEL_MENTION
        A pattern which checks for mentioned channels (e.g. <#1234567890>).
      • CUSTOM_EMOJI

        public static final java.util.regex.Pattern CUSTOM_EMOJI
        A pattern which checks for custom emojis (e.g. <:my_emoji:1234567890>).
      • MESSAGE_LINK

        public static final java.util.regex.Pattern MESSAGE_LINK
        A pattern which checks for message links (e.g. https://discord.com/channels/@me/1234/5678)
      • WEBHOOK_URL

        public static final java.util.regex.Pattern WEBHOOK_URL
        A pattern which checks for webhook urls (e.g. https://discord.com/api/webhooks/1234/abcd)
      • SNOWFLAKE

        public static final java.util.regex.Pattern SNOWFLAKE
        A pattern to match snowflakes.