or)
    2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 
  13. Methods 
    1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Deprecated 
    2. [ ` Object.prototype.__defineSetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineSetter__) Deprecated 
    3. [ ` Object.prototype.__lookupGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__lookupGetter__) Deprecated 
    4. [ ` Object.prototype.__lookupSetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__lookupSetter__) Deprecated 
    5. [ ` Object.prototype.hasOwnProperty() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty)
    6. [ ` Object.prototype.isPrototypeOf() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf)
    7. [ ` Object.prototype.propertyIsEnumerable() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable)
    8. [ ` Object.prototype.toLocaleString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toLocaleString)
    9. [ ` Object.prototype.toString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString)
    10. [ ` Object.prototype.valueOf() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf)

##  In this article

  * Description 
  * Examples 
  * Specifications 
  * Browser compatibility 
  * See also 

#  RegExp.input ($_)

**Deprecated:** This feature is no longer recommended. Though some browsers
might still support it, it may have already been removed from the relevant web
standards, may be in the process of being dropped, or may only be kept for
compatibility purposes. Avoid using it, and update existing code if possible;
see the  compatibility table  at the bottom of this page to guide your
decision. Be aware that this feature may cease to work at any time.

**Note:** All ` RegExp ` static properties that expose the last match state
globally are deprecated. See [ deprecated RegExp features ](/en-
US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features#regexp) for
more information.

The **` RegExp.input ` ** static accessor property returns the string against
which a regular expression is matched. ` RegExp.$_ ` is an alias for this
property.

##  Description

Because ` input ` is a static property of [ ` RegExp ` ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) , you always use it as
` RegExp.input ` or ` RegExp.$_ ` , rather than as a property of a ` RegExp `
object you created.

The value of ` input ` updates whenever a ` RegExp ` (but not a ` RegExp `
subclass) instance makes a successful match. If no matches have been made, `
input ` is an empty string. You can set the value of ` input ` , but this does
not affect other behaviors of the regex, and the value will be overwritten
again when the next successful match is made.

##  Examples

###  Using input and $_

js

    
    
    const re = /hi/g;
    re.test("hi there!");
    RegExp.input; // "hi there!"
    re.test("foo"); // new test, non-matching
    RegExp.$_; // "hi there!"
    re.test("hi world!"); // new test, matching
    RegExp.$_; // "hi world!"
    

##  Specifications

Specification  
---  
[ Legacy RegExp features  
#  additional-properties-of-the-regexp-constructor
](https://github.com/tc39/proposal-regexp-legacy-features/#additional-
properties-of-the-regexp-constructor)  
  
##  Browser compatibility

BCD tables only load in the browser  with JavaScript enabled. Enable
JavaScript to view data.

##  See also

  * [ ` RegExp.lastMatch ($&) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch)
  * [ ` RegExp.lastParen ($+) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastParen)
  * [ ` RegExp.leftContext ($`) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/leftConte