I knew how I can color a specific word where ever the word match … But I did not like it … because I have my own class and some fields follow each class … so suppose I have :
class1 has fields aaa
class2 has fields bbb
so I want to color aaa in red only if it came after class1 like this class1.aaa … But when I write class2.aaa I did not want to color aaa in red t :
and this the the jsfiddle
Note : I have function return true if (aaa) came after class1 … so only what I want to knew how to color aaa in red only if it came after class1 like this class1.aaa ?