Search in paragraph's text: Difference between revisions

Created Nim solution.
No edit summary
(Created Nim solution.)
Line 263:
],
)
</syntaxhighlight>
 
=={{header|Nim}}==
{{trans|Python}}
<syntaxhighlight lang="Nim">import std/strutils
 
let rawText = readFile("Traceback.txt")
 
for paragraph in rawText.split("\n\n"):
if "SystemError" in paragraph:
let index = paragraph.find("Traceback (most recent call last):")
if index != -1:
echo paragraph[index..^1]
echo "----------------"
</syntaxhighlight>
 
256

edits