by Mofi » Fri Mar 11, 2011 1:05 am
At Advanced - Configuration - Search - Set Find Output Format you could simply remove from Found Line the definition string $P($L): to get directly the format you want.
If the find result is captured to a document window, you can use in your script a regular expression replace command (here with UltraEdit engine).
UltraEdit.ueReOn();
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.matchCase=false;
UltraEdit.activeDocument.findReplace.matchWord=false;
UltraEdit.activeDocument.findReplace.regExp=true;
UltraEdit.activeDocument.findReplace.searchDown=true;
UltraEdit.activeDocument.findReplace.searchInColumn=false;
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.replaceAll=true;
UltraEdit.activeDocument.findReplace.replaceInAllOpen=false;
UltraEdit.activeDocument.findReplace.replace("%?:*: +", "");
If the list of found strings is in the output window and you want to modify the content of the output window, true this script block:
UltraEdit.selectClipboard(9);
UltraEdit.outputWindow.copy();
var sOutput = UltraEdit.clipboardContent.replace(/\b\w:\\.+?: +/g,"");
UltraEdit.outputWindow.showStatus=false;
UltraEdit.outputWindow.clear();
UltraEdit.outputWindow.write(sOutput);
// Or perhaps better the following line. I have not tested this script.
// UltraEdit.outputWindow.write(sOutput.replace(/\r/g,""));
if (UltraEdit.outputWindow.visible == false) UltraEdit.outputWindow.showWindow(true);
UltraEdit.clearClipboard();
UltraEdit.selectClipboard(0);