> But what if there's not only commas, but also periods and semicolons? I > want to find words between 2 near by punctuations. I think it would make > it difficult to use split instead of regular expression.
You could use re.split(r"\W", text) instead of the string split method to split on all non-word characters. Alternatively the regex you are looking for is probably r"\bjustice\b". -- http://mail.python.org/mailman/listinfo/python-list