darma teja

darma teja

  • NA
  • 496
  • 329.1k

replace same words in a string with different words

Aug 11 2016 9:01 AM
Hi All,
 
I have a string like this:
string s= "it is an \"Auto\" and The \"Auto\" has three seats and blabla \"Auto\" "
i want to to replace Auto with unique numbers, the output should be like this:
"it is an "Auto1" and The "Auto2" has three seats and blabla "Auto3" "
 
Thanks,
Darma 

Answers (3)