|
Microsoft(R) JScript(R) input 属性 |
语言参考 版本 3 |
返回执行查找的字符串。只读。
RegExp.input
任何时候改变了被查找的字符串,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); }