Thank you so much for your help Andrew. this is almost perfect. The issue is that when a paragraph contains two highlight colours it doesn't pick it up.
If you look at this image you will see what I mean..
If you can figure out a way to solve that I would be so grateful!