Discord is testing with a new AutoMod system and it accepts regex for filtering messages.
I have came up with this regex which filters out URLs:
((https?:\/\/)?[^\s.]+\.[\w][^\s]+)
This works fine, but it also filters the GIF urls too. so I want to exclude a few domains (tenor.com, giphy.com, discord.com, discordapp.net, cdn.discordapp.com, clips.twitch.tv) so I came up with this:
((https?:\/\/)?\b(?:(?!tenor|giphy|discord|clips|twitch|cdn|discordapp)\w)+\b\.[\w][^\s]+)
here's the test: https://regex101.com/r/1S2j7g/2
But discord doesn't support ?!
or any kind of look-ahead, look-behind.
Is there a way to convert this to a regex that doesn't use any look-around?