How can I replace:
something1 x something2 something3
something4 x something5 something6
something7 x something8 something9
with:
something1 1100 something2 something3
something4 1101 something5 something6
something7 1102 something8 something9
Welcome to the IDM Forum. This forum is meant as a user-to-user support mechanism where users can share knowledge and tips for all IDM software.
Since these forums are user-to-user based, IDM does not regularly read or reply to the posts in this forum. For problem reports, suggestions, or feature requests, you must email us directly. Our trained technical support staff answers most inquiries within 30 minutes.
if (UltraEdit.document.length > 0) {
// Ask user of script for simple string to find.
var sFind = UltraEdit.getString("Enter string to replace:",1);
if (sFind != "") { // Continue only if a string was entered.
// Define environment for script.
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.hexOff();
UltraEdit.ueReOn();
// Define the fixed replace parameters for the script.
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.matchCase=false;
UltraEdit.activeDocument.findReplace.matchWord=false;
UltraEdit.activeDocument.findReplace.regExp=false;
UltraEdit.activeDocument.findReplace.searchDown=true;
if (typeof(UltraEdit.activeDocument.findReplace.searchInColumn) == "boolean") {
UltraEdit.activeDocument.findReplace.searchInColumn=false;
}
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.replaceAll=false;
UltraEdit.activeDocument.findReplace.replaceInAllOpen=false;
// Ask the user for the starting value.
var nNumber = UltraEdit.getValue("Enter starting number:",1);
// The replace is done from current position in file to end of file.
while (UltraEdit.activeDocument.findReplace.replace(sFind,nNumber.toString())) {
nNumber++;
}
}
}