Question: How do I extract elements from a string

Hi

Could someone pls help write me code such that when text is entered, the first chemical element symbol in each word is identified and highlighed.

i/p: "the cat molly"

o/p: "tHe Cat Molly"

( like the opening title sequence on "Breaking Bad")

I got out the sledghammer and made a start

element.mw

Please Wait...