Last active
April 30, 2025 15:55
-
-
Save paceaux/025d6604b214ecfd91a4ead9a894fc5c to your computer and use it in GitHub Desktop.
profanity-regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const profanityRegex = /(((\b|\w+)?(fuck|shit|dick|twat|cock|douche|bitch|piss)(\w+|\b))|((\w+|\b)ass?(\b|hole|face|clown))|((\b)cunt(\w+|\b)))/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/((\b|\w+)?(fuck|shit|dick|twat|cock|douche|bitch)(\w+|\b))/
would capture infixes such asabsofuckinglutely and enshittification, as well as initials like twatwaffle, douchecanoe.
/((\w+|\b)ass)?\b/
captures standalone ass and ass suffixes((\w+|\b)ass?(\b|hole|face|clown))
captures standalone ass, ass prefixes, and asshole / face/((\b)cunt(\w+|\b))/
captures an initial cunt and allows for plurals, comparatives, etc