0 votes
in JavaScript by
What is a RegExp object in Javascript?

1 Answer

0 votes
by

RegExp object is a regular expression object with predefined properties and methods. Let's see the simple usage of RegExp object,

var regexp = new RegExp("\\w+");
console.log(regexp);
// expected output: /\w+/
...