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