I'd like to know the most convenient way to wrap some specified words with span-tags.
Example:
I have a word, which is dog. Here's the original text:
I have a dog, do you have a dog?
And output should be like this:
I have a <span class="highlight">dog</span>, do you have a <span class="highlight">dog</span>?
Any help?
EDIT:
Note, that it should also wrap words, even if they are not invidual (Peter-dog). Hope you got it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…