I want to replace a particular string from selected range only. e.g
"Hello @Bob and @Bob friend"
Output :
"Hello @Bob and friend"
I just want to remove the last word from selected range @Bob even it contains a duplicates in whole sentance and want to show it on UItextfield swift.
for more information i am looking something just like adding and removing tagging friends in whatsapp group.