The RegExp class represents a regular expression.
RegExp
Regular expressions can be written as literals, for example /[\d\.]+/g, or constructed with the RegExp constructor, for example new RegExp("[\\d\\.]+", "g").
/[\d\.]+/g
new RegExp("[\\d\\.]+", "g")