JScript  

input 属性($_)

返回执行规范表述查找的字符串。只读。

RegExp.input

与该属性有关的对象总是全局 RegExp 对象。

说明

任何时候改变了被查找的字符串,input 属性的值都会被修改。

下面的例子举例说明了 input 属性的用法:

function inputDemo(){
   var s;
   var re = new RegExp("d(b+)(d)","ig");
   var str = "cdbBdbsbdbdz";
   var arr = re.exec(str);
   s = "The string used for the match was " + RegExp.input; 
   return(s);
}

要求

版本 3

请参阅

RegExp 对象的属性 | 正则表达式语法

应用于:RegExp 对象