I have a string “JohnMarkMarkMark”
I want to replace the “Mark” with “Tom” with two cases
In first case i want to replace only first occurance of “Mark” Result will be: “JohnTomMarkMark”
In the second case i want to replace all the occurance of “Mark” Result will be: “JohnTomTomTom”
Please suggest
Thnaks
1 Answer