-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collapse repeated characters (possibly using regex) #8
Comments
Completely agree with you on this. Tackling this is already in the list of TODOs on the README:
I think one of the solutions could be to only allow specific characters to be repeated twice, such as I'm not sure regex is the best solution for this either, because Golang's Regex is known for not being the fastest, but it would be good to check what the performance difference is between multiple Anyways, thanks for creating an issue for this. |
The program
prints
I suggest you include a list of regexes to match cases such as this.
An alternative would be to collapse all repeated characters before matching, although this would have an issue with any profanities that contain repeated characters that are no longer profane once collapsed.
The text was updated successfully, but these errors were encountered: