Enable regex mode for searching messages
It would be really nice to implement a regular expressions-like syntax mode to search for a certain pattern more effectively than with a regular plaintext search.
This could be especially useful to find indeterminate patterns or things like URLs from a certain domain or something similar.
-
Indeed
1 -
That would be really cool, especially if it could be used with from: and other search parameters, like "(from:(regex:'*')"
3 -
por que?
-3 -
This would definitely help to find a specific message 3 -
Your suggestion is really good. We definitely need that. 2 -
I agree, The current search mode is too simple
2 -
I wish there were more upvotes for this... Hopefully someone @discord sees this and thinks it is a great idea, we really need this!
3 -
Just wanted to leave this here for why this wouldn't be a good idea - certain regex can lag a computer a TON, and assuming Discord handles searches on their side, this gives people the ability to just completely lag Discord.
In fact, a single regex was enough to shut cloudflare down for a little while: https://blog.cloudflare.com/cloudflare-outage/
-1 -
Discord already has rate limiting. They could just add a ratelimit for searching or increase it if it already has one. Or just increase the rate limit for searches when it uses regex. There are options discord can consider for less server lag. And I doubt that many users will use that feature since who in the world knows what regex is and how to use it? But for users who know how to use regex it would really be great to be able to use it.
1 -
It stunned me when I discovered that discord doesn't have this feature. Like what the fuck?
0 -
If users won't use regex, bots will.
As much as I want this feature, there are many ways it's abuse-able. That's said it's not entirely impossible.
Regex that break things usually use complicated look-ahead/behind rules which don't limit how far they lookup.
By putting proper limitations, it's definitely doable without putting servers on a strain.
e.g. implement essentials like wildcards only (no look-behind/look-ahead, no grouping) + char minimum limit, search filtering ("-donotmatch"), "match exact words"-1
Please sign in to leave a comment.
Comments
11 comments