reading text-and-numbers file word by word
i have a 3-page text file which contains both text and numbers. i wish to jump to the 3rd page (to save computation time), read the words in that page word by word, and each word that i read i have to compare with a word that i have in mind. once the read word matches the desired word, i wish to extract it, and a number that is near (but not beside/adjacent to) it, then write both items to another text file.
does anyone have any idea how i can go about doing it?