I am trying to parse a text file using regex. I am using notepad++ and would like to search for the keyword Answer and delete everything after it within the same line including the keyword. Here is an example of the text file:
Give me the links for some blogs related to SQL Server.
A. www.sqlskills.com
B. www.techcunrch.com
C. www.nbc.com
D. www.forbes.com
Answer: A
I would like to generate a regex for it and replace all answers with blanks so that I have only questions which I can administer to somebody. Is that possible?
For the above case the result should be:
Give me the links for some blogs related to SQL Server.
A. www.sqlskills.com
B. www.techcunrch.com
C. www.nbc.com
D. www.forbes.com
Assuming the answer is a capital letter add Notepad++ will multiline search.