Getting a specific word out of Notepad

Is there any way to get the specific data out of notepad?
For example my notepad contains content like:-1:
My name is John.
My Age is 27
I want output as John and 27

If you are having the notepad in the same format you can use this
Read the notepad and store it in a string varaiable.
1.Split the string based on NewLine Character. and store it in a array.
2.Run one foreach loop
3.Split each item based on space and take the last item.


1 Like