The bit in the if statement decides whether the text you are
interested in is there.
Very low-level programming, this, but it works. Admittedly not very
elegant, so I hope someone comes up with something better.