正则表达式替换字符串的多个部分(在Visual Studio 2012中)

Joh*_*n C 5 visual-studio-2012

基本上我正在更新旧的Web应用程序以符合多浏览器.原来程序员用过的地方 -

document.all.element
Run Code Online (Sandbox Code Playgroud)

据我所知,".all"仅是IE,在IE 4中引入.符合标准的".getElementById"函数是在IE 5中引入的.我想将上述语句的实例更改为 -

document.getElementById("element")
Run Code Online (Sandbox Code Playgroud)

我将如何形成这个正则表达式,特别是使用Visual Studio的"查找和替换"对话框?

Joh*_*n C 2

我不确定这是否是我使用 Visual Studio 2012 RC 的问题,但使用大括号无法匹配任何内容。

我最终使用了 find 表达式 -

document\.all\.([a-zA-Z0-9]+)
Run Code Online (Sandbox Code Playgroud)

和替换

document.getElementById("$1")
Run Code Online (Sandbox Code Playgroud)

“$1”指的是括号中的表达式。

谢谢你们的帮助。