Ever wondering how to replace text in string with Javascript?
You can use replace() function as below.
1 2 3 4 5 6 | BigString="Sometext"; BigString.replace(/Sometext/gi, "Newtext"); |
Ever wondering how to replace text in string with Javascript?
You can use replace() function as below.
1 2 3 4 5 6 | BigString="Sometext"; BigString.replace(/Sometext/gi, "Newtext"); |