namens check
This commit is contained in:
0
src/UE00_Other/namen_check/kontakte.vcf
Normal file
0
src/UE00_Other/namen_check/kontakte.vcf
Normal file
0
src/UE00_Other/namen_check/namen.csv
Normal file
0
src/UE00_Other/namen_check/namen.csv
Normal file
|
|
28
src/UE00_Other/namen_check/namen_check.java
Normal file
28
src/UE00_Other/namen_check/namen_check.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package UE00_Other.namen_check;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class namen_check {
|
||||
public static void main(String[] args) throws IOException {
|
||||
List<String> kontakte = new ArrayList<>();
|
||||
List<String> namen = new ArrayList<>();
|
||||
for (String line : Files.readAllLines(Path.of("src/UE00_Other/namen_check/kontakte.vcf"))) {
|
||||
Matcher matcher = Pattern.compile("N:(.*;.*);.*;.*;").matcher(line);
|
||||
while (matcher.find()) kontakte.add(matcher.group(1));
|
||||
}
|
||||
for (String line : Files.readAllLines(Path.of("src/UE00_Other/namen_check/namen.csv"))) {
|
||||
Matcher matcher = Pattern.compile("\"([^\"]+)\"\\s+<[^>]+>").matcher(line);
|
||||
while (matcher.find()) namen.add(matcher.group(1));
|
||||
}
|
||||
for (String kontakt : kontakte)
|
||||
for (String name : namen)
|
||||
if (kontakt.split(";")[0].equalsIgnoreCase(name.split(" ")[0]))
|
||||
System.out.println(name + " - " + kontakt.replaceAll(",", " "));
|
||||
}
|
||||
}
|
||||
@@ -131,6 +131,5 @@ public class MatheClient extends Thread {
|
||||
}
|
||||
} catch (Exception _) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user