I have a long text and I would like to add a no-wrap after specific key words. Lets say: 'Mr.', 'the', 'an' the only problem is I do not know what word will be after the key. So if I have a text like:
... there is an elephant in the room ...
script should change it to:
... there is <span class="no-wrap">an elephant</span> in <span class="no-wrap"> the room</span> ...
I know that it should be done with regular expression of some sort but I am really bad at those. So any tips on how to do this in php?