Skip to content

Commit

Permalink
Core: WordSearch: Split into words without empties
Browse files Browse the repository at this point in the history
by splitting on one or more spaces inbetween.
  • Loading branch information
faerietree committed Mar 16, 2017
1 parent 206bf2f commit c20e56c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aufgaben_db/MethodenWortSuche.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static String sucheErstesWortImDoc(String[] filename) {
String zeile = ersetzeSzUndUmLeer(filename[i]);
System.out.println(zeile);
// Split into words|word chunks:
String[] array = zeile.split("\\s");
String[] array = zeile.split("\\s+");

// First word fragment made of > 3 connected chars:
for (int j = 0; j < array.length; j++) {
Expand Down Expand Up @@ -111,7 +111,7 @@ public static String sucheLetztesWortImDoc(String[] raw_content) {

String zeile = ersetzeSzUndUmLeer(line);
// Split into words|word chunks:
String[] array = zeile.split("\\s");
String[] array = zeile.split("\\s+");

for (int j = array.length - 1; j > -1; j--) {
String w = array[j];
Expand Down

0 comments on commit c20e56c

Please sign in to comment.