From 8528c7f1191905198c2ae9d064137dc339619afc Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Thu, 17 Oct 2024 22:27:48 +0100 Subject: Improve readability of invite regex by indenting the large OR group --- pydis_core/utils/regex.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'pydis_core') diff --git a/pydis_core/utils/regex.py b/pydis_core/utils/regex.py index 13a6d220..1ccc0813 100644 --- a/pydis_core/utils/regex.py +++ b/pydis_core/utils/regex.py @@ -4,15 +4,17 @@ import re DISCORD_INVITE = re.compile( r"(https?://)?(www\.)?" # Optional http(s) and www. - r"(discord([.,]|dot)gg|" # Could be discord.gg - r"discord([.,]|dot)com|" # or discord.com/invite - r"discordapp([.,]|dot)com|" # or discordapp.com/invite - r"discord([.,]|dot)me|" # or discord.me - r"discord([.,]|dot)li|" # or discord.li - r"discord([.,]|dot)io|" # or discord.io - r"((?\S+)", # the invite code itself flags=re.IGNORECASE ) -- cgit v1.2.3