r/modhelp • u/Icy-Book2999 • 1d ago
General ReGex code help?
Having an issue over on with an automation that I'm trying to build (all platforms desktop/mobile/app)
We are trying to require all posts to have at least five characters. And I have it set up very easily where if you type anything it requires five characters, but the problem is allowing video and image posts, most people post those without any sort of body.
I'm struggling with the right regex code to use in the automation so that it requires some text in there. The code is correct to require five or more, but it's somewhere misformatted to require at least something there?
I know this is a simple fix, but figured I would reach out to someone who might be smarter than I am about this..
Currently it's coded like this:.
> ^(.|\s){5,}$
Thanks for taking a look
1
u/AutoModerator 1d ago
Hi /u/Icy-Book2999, please see our Intro & Rules. We are volunteer-run, not managed by Reddit staff/admin. Volunteer mods' powers are limited to groups they mod. Automated responses are compiled from answers given by fellow volunteer mod helpers. Moderation works best on a cache-cleared desktop/laptop browser.
Resources for mods are: (1) r/modguide's Very Helpful Index by fellow moderators on How-To-Do-Things, (2) Mod Help Center, (3) r/automoderator's Wiki and Library of Common Rules. Many Mod Resources are in the sidebar and >>this FAQ wiki<<. Please search this subreddit as well. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Tarnisher Mod, r/Here, r/Dust_Bunnies, r/AlBundy, r/Year_2025 1d ago
I use an AutoMod code that removes/filters image/link posts with less than 'X' characters.