String_Object.replace(String you want to change, Replacing_String)
- String_Object: Please specify the valid string to perform search. Replace function will replace portion of a string present in this String_Object.
- String you want to change: Please specify a valid string or Regular expression you want to change. Whatever you place here, REPLACE Function will be replace it by new string
- Replacing_String: Please provide a valid new string you want to insert into the String_Object.
Within the replace function Script tag, First we declared two String variables Str1, Str2 and assigned corresponding values using following statement
var Str1 = "We are ABC working at abc company"; var Str2 = "We are abc working at abc company";
In order to perform case-insensitive search, the following statement is using regular expression gi
Thank You for Visiting Our Blog