返回执行规范表述查找的字符串。只读。
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);}
要求
请参阅
|
应用于: