if i have a notpad file and want to search it from thired line in each paragraph

and check if first word is 'SOLUTION' then extract some words and go to the next 'SOLUTION' and do the same thing

if first word is 'COMMENT' then take the whole line



(actually it's not a paragraph they are some groups of unrelated lines separated by empty line )

can anyone help..... PLEASE