RegExp The RegExp object is used for matching text with a pattern. For an introduction to regular expressions, read the Regular Expressions chapter in the JavaScript Guide. Description Literal notation and constructor There are two ways to create a RegExp object: a literal notation and a constructor. The literal notation's parameters are enclosed between slashes and do not use quotation marks. T..