update assignmnet 2 q2

This commit is contained in:
SowinskiBraeden committed 2025-03-14 19:56:26 -07:00
1 parent 8404cad406
commit bd81ca2522
1 file changed
+2 -1
@@ -6,6 +6,7 @@ import java.io.FileNotFoundException;
import java.util.List;
import java.util.ArrayList;
import java.util.regex.Pattern;
/**
* <p>This is where you put your description about what this class does. You
@@ -47,7 +48,7 @@ public class WordCounter {
}
}
if (!exists) {
if (!exists && Pattern.matches("^[a-zA-Z]+", word)) {
words.add(new Word(word));
}
}