making regular expression in javascript code example
Example 1: using regex in javascript
//Adding '/' around regex
var regex = /\s/g;
//or using RegExp
var regex = new RegExp("\s", "g");
Example 2: regular expression in javascript
let re = /ab+c/;