I want a function to find a pattern(word character) on each line inside a file. my code is sort of working but it does not go further after reading the first line. can anyone help? import re
inputtext = open('input.txt', 'r+')
inputtext1 = inputtext.read()
match = re.search(r'([matchwordinline].*\n)+', inputtext1)
if match:
match1 = match.group()
print match1