Data update

This commit is contained in:
Ingy döt Net 2023-09-16 17:28:03 -07:00
parent 5af6d93694
commit 796d366b97
455 changed files with 7413 additions and 1900 deletions

View file

@ -0,0 +1,25 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
public final class SearchInParagraphsText {
public static void main(String[] args) throws IOException {
Path filePath = Path.of("./Traceback.txt");
String fileContents = Files.readString(filePath, StandardCharsets.UTF_8);
String[] paragraphs = fileContents.split(PARAGRAPH_SEPARATOR);
for ( String paragraph : paragraphs ) {
if ( paragraph.contains("SystemError") ) {
int index = paragraph.indexOf("Traceback (most recent call last):");
if ( index >= 0 ) {
System.out.println(paragraph.substring(index));
System.out.println("----------------");
}
}
}
}
private static final String PARAGRAPH_SEPARATOR = "\r\n\r\n";
}