Javascript Replace() Function

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

Javascript String Replace() Function Example1

Javascript String Replace Method Example2

Javascript String Replace Method Example3