How to get the last text of a line in a text file?

For example, we have alphabet.text and it contains the following texts. I would like to get the last text on the 2nd line which is “House”. How can I accomplish it?

Apple Boy Car Doctor
Elephant Flower Girl House

example:

line (number of lines of it) of file “c:\windows\system32\drivers\etc\hosts”

-jgo

1 Like

How can you get the last word/character on a specific line?

Im not sure if there is a way of retrieving the last word, but I think you can retrieve the last x amount of charters of a specific line. Sorry I dont know it by heart. im looking in some notes from training I have

following text of position ((maximum of (start of it) of substrings separated by " " of line (number of lines of it) of file “c:\windows\system32\drivers\etc\hosts”)) of line (number of lines of it) of file “c:\windows\system32\drivers\etc\hosts”

edit:

following text of position ((maximum of (start of it) of substrings separated by " " of it)) of line (number of lines of it) of file “c:\windows\system32\drivers\etc\hosts”

2 Likes

Or
following text of last " " of line (number of lines of it) of file "whatever"

1 Like

“Walker!!!” shouted out loud ala Jerry Seinfeld.

1 Like

Hey, I like the use of “start of it”, that was part of the April challenge!

yes.
it was, he said.