編集中のファイルを grep にかけて、結果を開くだけ。の割にはちょっと長いかな……。
<plugin name="正規表現検索(&R)"> <description>正規表現を使ってGrep検索します。</description> <script language="VBScript"><![CDATA[ Set oFSO = CreateObject("Scripting.FileSystemObject") Set oShell = CreateObject("WScript.Shell") sGrep = "D:\sardine\cygwin\bin\grep.exe" sGrepOpt = "-Hn" sExecutor = "cmd /c" sTmpDir = oFSO.BuildPath(Alpha.CurrentDirectory, "grep.tmp") sTmpName = "grep-" & DateDiff("d", DateValue("2004/1/1"), Date) & "." & Timer & ".tmp" sRegExp = InputBox("検索:", "正規表現検索") If sRegExp <> "" Then If Not oFSO.FolderExists(sTmpDir) Then oFSO.CreateFolder sTmpDir End If sTmp = oFSO.BuildPath(sTmpDir, sTmpName) sCmd = sExecutor & " " & sGrep & " " & sGrepOpt & " '" & sRegExp & "' " & Alpha.ActiveDocument.FilePath & " > " & sTmp oShell.Run sCmd, 1, True If oFSO.FileExists(sTmp) Then Alpha.Documents.Open sTmp, 0, 0 End If End If ]]></script> </plugin>