For example, I were to save contact details on a .txt file and after that is saved, I would want to view the contact details of the person only by entering the name.
For example, if I were to have a .txt file containing these strings,
Name: Shiroe
Contact Number: 1234567890
Name: Kirito
Contact Number: 0987654321
and I entered "Shiroe" as the contact name to be viewed. My expected output would be,
Name: Shiroe
Contact Number: 1234567890
So, bottom line, is it possible to read a string below a string (read "Shiroe"/"Name: Shiro" first and then reads the line below/after "Shiroe") to use as an output? Or am I asking the wrong question?