昨天不是发了吗,还有问题吗?
<textarea id="textarea1">
Public WithEvents _cmdSearch_2 As System.Windows.Forms.Button
Public WithEvents _chkULCase_1 As System.Windows.Forms.CheckBox
Public WithEvents sstabSearch As System.Windows.Forms.TabControl
Public WithEvents staMain As AxComctlLib.AxStatusBar
Public WithEvents treGroup As AxMSComctlLib.AxTreeView
    Public WithEvents treTree As AxMSComctlLib.AxTreeView
Public WithEvents ImgToolBar As AxMSComctlLib.AxImageList
Public WithEvents rtfFile As AxRichTextLib.AxRichTextBox</textarea>
<script language=javascript>
function getName(key)
{
var str=document.getElementById("textarea1").value
var re=new RegExp("Public\\s+WithEvents\\s+(.+?)\\s+As(.+?)"+key,"i")
while(re.test(str))
{
alert(RegExp.$1)
str=str.replace(re,"")
}
}
getName("TreeView")
</script>