#automod URL regex

1 messages · Page 1 of 1 (latest)

sterile carbon
#

I am still unsure what regexes discord supports, but i know for sure they don't allow ?! chars in regexes for negative look ahead.

regex = r"^(?!https:\/\/tenor\.com\/view\/[\w\-]+-gif-\d+).*"
This is the regex i've tried adding to automod (via bot) in order to stop any links from coming, But cannot use ?! for negative lookahead over tenor, Do you guys know any proper fixes for this? or how this could be done?

olive cape
#

I don't think this is really feasible with the builtin automod - it uses a linear-time regex engine without backtracking, so you can't have lookarounds like ?! :/

sterile carbon