Mar 23, 2016#2
The script code is so easy for this task that I save time and don't comment it.
Code: Select all
if (UltraEdit.document.length > 0)
{
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.top();
UltraEdit.perlReOn();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.matchCase=true;
UltraEdit.activeDocument.findReplace.matchWord=false;
UltraEdit.activeDocument.findReplace.regExp=true;
UltraEdit.activeDocument.findReplace.searchDown=true;
if (typeof(UltraEdit.activeDocument.findReplace.searchInColumn) == "boolean")
{
UltraEdit.activeDocument.findReplace.searchInColumn=false;
}
var asCharacters = ['A','B','C','D','E','F','G','H','I','J','K','L','M',
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
var nCharCount=1;
var nCharacter=0;
while(UltraEdit.activeDocument.findReplace.find("(?<=sec)@+"))
{
var sIdentifier="";
for (var nCount=0; nCount < nCharCount; nCount++)
{
sIdentifier+=asCharacters[nCharacter];
}
UltraEdit.activeDocument.write(sIdentifier);
if (++nCharacter >= asCharacters.length)
{
nCharacter=0;
nCharCount++;
}
}
}
The character array can be modified to whatever you want.
Best regards from an UC/UE/UES for Windows user from Austria