Basically I have two html strings:
a = "Cowboys, Eagles, Redskins, Giants"
b = "Jets, Cowboys, Patriots, Eagles"
I want to change the color attribute of the matching items. I have tried making them into arrays, cycling through a and checking if each element is in b, but once I found the matching elements, I had to make it back into an HTML string to print it. How do I search for the matching terms within the string and set just those subsections to a different color? Does that approach make sense, or does anyone have something better?
Thanks
This should do what you need. I tried to follow what you were asking for as closely as possible.