04-Oct-2022
.
Admin
Hello Friends,
Today, how to use string replace using node js is our main topic. We will look at an example of string replace using nodejs. I would like to show you string replace using node js. In this article, we will implement a nodejs string replace using. Follow bellow tutorial step of node js string replace using.
In this post, you'll learn how to use string replace using nodejs. I will explain simply about string replace using node js.
So, let's start following example:
server.js
// create string
var temp = 'This is Wesite.';
// replace string
var newStr = temp.replace(/wesite/i, 'Nicesnippets');
console.log(newStr);
Output:
This is Nicesnippets.
I hope it can help you...
#Node JS