Reputation: 2526
im trying to figure out the regex to use to split an essay into words WITHOUT punctuation. I tried splitting by whitespace, but that gives some tokens with the punctuation. I also tried to split by word chars, which returned an array of empty strings for some reason:
String[] words = line.split("\\w+");
Upvotes: 5
Views: 10553