The replace() function of string object replaces text in a specified string, it will use regular expression to replace text or search string. Use it for example to replace perticuler text in a specified string.
Syntax