php - Add minimum characters to 'bad word' regex? -
i made regex
captures 'bad words' , substitutes *** can return user in form if bad words found, simplified version can found here:
https://regex101.com/r/aleb61/3 (?i)\b(bitch)\b
i'd require min 25 characters in same regex instead of having run 2 separate passes on (e.g. 1) bad words 2) enough chars?) possible? need add above "less 25 characters" pipe.
regex minimum {min,max} {1,15} min of 1 character, max of 15.
i'd list of "bad words" @ least 1 must exist
as far regex limit goes /^[word]{1,15}$/
- must 1 -> 15 "word" found
check post out profanity filter using regular expression (list of 100 words)
wiki
Comments
Post a Comment