Exercise: print lines with Report:


In many cases you get some text report in some free form of text (and not in a CSV file or an Excel file.) You need to extract the information from such a file after recognizing the patterns. This exercise tries to provide such a case.

Given a file that looks like this:


examples/files/text_report.txt
This is a text report there are some lines that start with
Report: 23
Other linese has this somewhere in the middle.

Begin report

Report: -3

Like this. Report: 17
More lines starting with
Report: 44

End report

We will have some exercise with this file. Maybe 4 exercises.
Report: 123