Spyke
perchanceยทPerchance - Create a Random Text Generatorbyallo

[suggestion] comment plugin stronger banned word option

banned word "muse" but the "motionmuse" ads still come thru. this is the person who i've banned 20+ times but they just change their ip. Dear Perchance, can you please add an additional list to comment plugin for VeryBannedWords which prevents a comment if it contains the word at all? I think this makes tons of sense since it's silly banning a word like 'Chupacabra' and people can just type 'Chupacabraa' and it gets around it.

View original on lemmy.world
RudBo
lemmy.world

Most "Banned Word" lists are set to "whole word" by default to prevent mistakes.(This is most likely and I never really tested or know anything haha)

band word types: muse

The system actually runs: /\bmuse\b/ (It automatically adds word boundaries).

Result: This ban FAILS to block https://motionmuse.ai/ because it only looks for the whole word "muse" surrounded by spaces or punctuation.

In this case, you should ban /motionmuse/i instead of just muse

๐Ÿง  Full Regex Guide for Prompt Filtering and Banning (I don't know if this is true or not anyway...)

  • /i โ†’ case-insensitive flag. Matches letters regardless of case. Example: /ahegao/i โ†’ matches 'Ahegao', 'AHEGAO', etc.

  • \b โ†’ word boundary. Ensures the match is a whole word, not part of a longer word. Example: /\bvore\b/ โ†’ matches "vore", but NOT "carnivore"

โœ… Combine /i + \b for safe, accurate filters: /\b(vore|gore|nudity)\b/i โ†’ blocks keywords regardless of case, avoids substring errors.

  • .* โ†’ greedy match: matches as much as possible. Example: /cute.*girl/ on "cute baby girl and cute big girl" โ†’ matches from first "cute" to last "girl"

  • .*? โ†’ non-greedy match: matches as little as possible. Example: /cute.*?girl/ โ†’ matches "cute baby girl" only

โš ๏ธ In short prompts with only one girl, .* and .*? behave the same. Difference matters only when multiple targets exist in the same string.

  • s? โ†’ optional "s", allows singular or plural forms. Example: /\bcubs?\b/ โ†’ matches "cub" and "cubs" /thongs?/ โ†’ matches both "thong" and "thongs"

๐Ÿงฉ Common Patterns: /\b(term1|term2|term3)\b/i โ†’ safe multi-keyword match ; Matches: term1 OR term2 OR term3 /keyword1.*?keyword2/i โ†’ non-greedy span between phrases ; Matches: keyword1... AND... keyword2 /\bsomeword\b.*ContentLabel/i โ†’ flag word only when paired with OUR CUSTOM 18+ label /cute.*(boy|girl).*ContentLabel/i โ†’ complex combo with fallback grouping ; Matches: "cute innocent girl... ContentLabel"

3
alloreply
lemmy.world

LOL i tried what you said and i dont know if its what caused it but my generator is now invisible on the generators page. when i touch edit it says it is public. when i make a change and save it doesnt show up on generators page.

1
alloreply
lemmy.world

it was solved. had nothing to do with regex. had to do with fresh nsfw detection on generators page

3

That could be tricky. Moving the ban list out as a plugin seems could prevent it.

2
Mack2reply

How did you resolve this as it appears my gen no longer appears on the generators page either.

2

You reached the end

[suggestion] comment plugin stronger banned word option | Spyke