Skip to content

Commit 21a32de

Browse files
ChrisLoveringbj0key
andcommitted
Update filter regex to not be overly strict
Co-authored-by: bj0key <[email protected]>
1 parent bdaaa2e commit 21a32de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pydis_core/utils/regex.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
r"(https?://)?(www\.)?" # Optional http(s) and www.
77
r"(discord(app)?)?" # Optional discord(app)
88
r"([.,]|dot)" # Various characters to cover dots
9-
r"(gg|com|me|li|io)" # A few TLDs that embed within discord
10-
r"((/|slash|\\)(invite))?" # / or \ or 'slash' invite
9+
r"("
10+
r"(gg|me|li|io)" # A few TLDs that embed within discord
11+
r"|com(\/|slash|\\)invite" # Only match com/invite
12+
r")"
1113
r"(/|slash|\\)" # / or \ or 'slash'
1214
r"(?P<invite>\S+)", # the invite code itself
1315
flags=re.IGNORECASE

0 commit comments

Comments
 (0)