I\'m new to scripting and have been reading about how to use regular expressions.
I want to fetch the complete line matching a pattern.
my ouptut is:
If you want to print the whole line you can just iterate through the lines and print those that contain 'packet loss'.
for line in lines: if line.find('packet loss') != -1: print line