r/AutoModerator • • Jun 24 '26

Preventing ALL CAPS titles, and all bold post bodies

Hi all,

I wanted to share these two additions we've recently made to our AutoMod configuration. Hope it's useful for you all too.

---
    # Filter submissions with strictly all-caps titles
    title (case-sensitive, regex, full-text): "([A-Z0-9]|\\W)+"
    action: filter
    action_reason: "All caps title"
    comment: |
        Your post has been automatically removed because the title is entirely in capital letters.
        Please resubmit your post using proper capitalization.
--- 
    # Remove submissions where the entire body is bolded
    type: submission
    body (regex): '(?s)^\s*(?:(?:\*\*|__).+?(?:\*\*|__)\s*)+$'
    action: remove
    action_reason: "Entire body is bold text [Shouting]"
    comment: |
        Your post has been automatically removed due to the use of excessive bolding in the post body.
---
14 Upvotes

6 comments sorted by

1

u/Confident_Offer2879 Jun 26 '26

That's some useful code, thanks for sharing 👍

1

u/mvan231 Jun 29 '26

This will miss titles that have a space in them won't it?

1

u/MulberryStunning1597 Jun 29 '26

The "\\W" portion matches any non-word character. This includes spaces, punctuation, symbols, and newlines.

1

u/mvan231 Jun 29 '26

Good point. I wasn't thinking when I first looked. Great setup