Skip to content

Commit

Permalink
has_repeated_chars: restrict set of chars to split
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-daniels committed Jul 4, 2015
1 parent 1a81c3a commit 15a2737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion findspam.py
Expand Up @@ -5,7 +5,7 @@


def has_repeated_words(s):
words = regex.split("\\W", s)
words = regex.split(r"[\s.,:;!/\()\[\]+_-]", s)
words = [w for w in words if w != ""]
curr = 0
prev = ""
Expand Down

0 comments on commit 15a2737

Please sign in to comment.