ES6 RegExp search() ES6 RegExp replace() ES6 RegExp split() ES6 RegExp search() var str = 'Welcome to ES6.We are learning ES6'; var re = new RegExp(/We/); var found = str.search(re); console.log(found); ES6 RegExp replace() ES6 RegExp split()