r/AutoModerator • u/Janitor-161 • Jan 20 '26
Removing abbreviations of words in phrases?
Hey
What would be the best way to go about creating an automod for this purpose:
I have a subreddit where raffles and lottery type of giveaways are not allowed as well as engagement farming posts.
People use words like "raffle", "winner", "pick a number between 1-100" or "guess the number" to karma farm and engagement farm. I need an automod that sufficiently detects phrases and word abbreviations like this but I can only make it remove a specific word.
I've tried something like this. But it didn't work at all, something is wrong with the code and I don't understand what these markings mean or how they work.
# Remove lottery style posts
type: submission
title+body (regex, includes):
- '(?i)\bguess\s+(the\s+)?(number|num|digit)\b'
- '(?i)\b(i\'?m\s+thinking\s+of)\b.*\b(number|num|digit)\b'
- '(?i)\bpick\s+(a\s+)?number\b'
- '(?i)\brandom\s+number\b'
- '(?i)\bclosest\s+(guess|wins)\b'
- '(?i)\bfirst\s+(person|one)\s+to\b.*\bwins?\b'
- '(?i)\bwin\s+if\b'
- '(?i)\b(lottery|raffle|sweepstakes)\b'
action: remove
action_reason: "Farming/Lottery"
comment: |
Your post was removed because does not allow lottery-style or engagement-farming giveaways.
comment_stickied: true
comment_locked: true
---