>>> import re
>>> r = re.compile('(?i)lsb')
>>> with open('/var/log/boot.log', 'r') as f:
... for line in f:
... if r.search(line):
... print(line, end='')
...
[ OK ] Started LSB: AppArmor initialization.
Starting LSB: daemon to balance interrupts for SMP systems...
Starting LSB: Record successful boot for GRUB...
Starting LSB: automatic crash report generation...
Starting LSB: loads/unloads the sep3_15 driver at boot/shutdown time...