Just want to know if its possible to do a search function using a keyword on a text file in C#.
lets just call the text file test.txt, and the content of the file is
AUTHOR xy, yx, yy
COMMENT very very good
COVER hard, soft
So BOOK is the keyword and AUTHOR, YEAR, PRICE and COMMENT are sub-keywords marked by spaces before the words(likewise for MAGAZINE and COVER).
What I'm after is when user type in keyword BOOK, it returns the whole 5 lines starting from BOOK to COMMENT. And when user types in PRICE, it returns only 1 line(PRICE 99,77,195).
The output could be just a display in the console.