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"

all 7 comments