Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
|
|
@ -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";
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue