How is it possible to obtain the line numbers of all the text snippets matching a given regexp, within a file?
regexp
file_content = f.rea
with open(somefile, 'r') as f: line_numbers = [n for n, line in enumerate(f) if re.search(someRegexp, line)]