Reputation: 376
I have a string
"vtn:o:result:/buffer/get/"
I want to replace character "o" with "b" So that resultant string is
"vtn:b:result:/buffer/get/"
I am trying following method:
var alphabet = "vtn:o:result:/buffer/get/";
alphabet = alphabet.replace(/:o.*:/, 'b');
But not getting the required result. I don't want to use jQuery, just JavaScript.
Upvotes: 0
Views: 76