Type G$?XXXX
G
to go to the end of the file$
to go to the end of the line?
to search backwardsXXXX
being what you want to search for
You could also do gg?XXXX
which goes to the start of the file, then searches backwards, wrapping around to the end of the file. However for large files it can be slow to seek to the start of the file and then immediately to the end of the file.