I do not understand what you want from us. You can simply record a macro on executing once the finds or replaces manually.
For example I run with your strings UltraEdit regular expression Replace All commands with UE v20.00.0.1056 and recorded those replaces to a macro attached to this post. It could be that you cannot open this macro file when using an older version of UltraEdit. UltraEdit records non ASCII characters encoded in UTF-8. In edit macro dialog they are displayed as UTF-8 byte sequences without conversion back to Unicode.
As script created with help of
Creating a Perl regular expression string with ANSI/Unicode characters.
Code: Select all
if (UltraEdit.document.length > 0) // Is any file opened?
{
// Define environment for this script.
UltraEdit.insertMode();
if (typeof(UltraEdit.columnModeOff) == "function") UltraEdit.columnModeOff();
else if (typeof(UltraEdit.activeDocument.columnModeOff) == "function") UltraEdit.activeDocument.columnModeOff();
// Move caret to top of the active file.
UltraEdit.activeDocument.top();
// Define the parameters for the Perl regular expression Replace All commands.
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;
}
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.replaceAll=true;
UltraEdit.activeDocument.findReplace.replaceInAllOpen=false;
// Run the Perl regular expression Replace All commands.
UltraEdit.activeDocument.findReplace.replace("^a.*?=[^\\x{0905}\\x{0906}\\x{090f}\\x{0910}\\x{0914}\\x{0913}\\x{090d}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^b.*?=[^\\x{092c}\\x{092d}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^c.*?=[^\\x{091a}\\x{091b}\\x{0938}\\x{0915}\\x{0915}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^d.*?=[^\\x{0926}\\x{0921}\\x{0927}\\x{0922}\\x{091c}\\x{094d}\\x{091e}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^e.*?=[^\\x{090f}\\x{0907}\\x{0908}\\x{0910}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^f.*?=[^\\x{092b}\\x{092b}\\x{093c}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^g.*?=[^\\x{0917}\\x{0917}\\x{093c}\\x{0918}\\x{091c}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^h.*?=[^\\x{0939}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^i.*?=[^\\x{0905}\\x{0906}\\x{0907}\\x{0908}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^j.*?=[^\\x{091c}\\x{091c}\\x{093c}\\x{091d}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^k.*?=[^\\x{0915}\\x{0915}\\x{093c}\\x{0916}\\x{0916}\\x{093c}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^l.*?=[^\\x{0932}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^m.*?=[^\\x{092e}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^n.*?=[^\\x{0928}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^o.*?=[^\\x{0913}\\x{0906}\\x{0911}\\x{0909}\\x{090a}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^p.*?=[^\\x{092a}\\x{092b}\\x{092b}\\x{093c}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^q.*?=[^\\x{0915}\\x{093c}\\x{0915}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^r.*?=[^\\x{0930}\\x{090b}\\x{0939}\\x{0943}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^s.*?=[^\\x{0938}\\x{0936}\\x{0937}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^t.*?=[^\\x{0924}\\x{091f}\\x{0925}\\x{0920}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^u.*?=[^\\x{0905}\\x{092f}\\x{0909}\\x{090a}].*$", "");
UltraEdit.activeDocument.findReplace.replace("^v*.?=[^\\x{0935}]*.$", "");
UltraEdit.activeDocument.findReplace.replace("^w*.?=[^\\x{0935}]*.$", "");
UltraEdit.activeDocument.findReplace.replace("^y*.?=[^\\x{092f}]*.$", "");
UltraEdit.activeDocument.findReplace.replace("^z*.?=[^\\x{091c}\\x{093c}\\x{091c}\\x{091d}]*.$", "");
}
And the script code as macro code.
Code: Select all
InsertMode
ColumnModeOff
Top
PerlReOn
Find MatchCase RegExp "^a.*?=[^\x{0905}\x{0906}\x{090f}\x{0910}\x{0914}\x{0913}\x{090d}].*$"
Replace All ""
Find MatchCase RegExp "^b.*?=[^\x{092c}\x{092d}].*$"
Replace All ""
Find MatchCase RegExp "^c.*?=[^\x{091a}\x{091b}\x{0938}\x{0915}\x{0915}].*$"
Replace All ""
Find MatchCase RegExp "^d.*?=[^\x{0926}\x{0921}\x{0927}\x{0922}\x{091c}\x{094d}\x{091e}].*$"
Replace All ""
Find MatchCase RegExp "^e.*?=[^\x{090f}\x{0907}\x{0908}\x{0910}].*$"
Replace All ""
Find MatchCase RegExp "^f.*?=[^\x{092b}\x{092b}\x{093c}].*$"
Replace All ""
Find MatchCase RegExp "^g.*?=[^\x{0917}\x{0917}\x{093c}\x{0918}\x{091c}].*$"
Replace All ""
Find MatchCase RegExp "^h.*?=[^\x{0939}].*$"
Replace All ""
Find MatchCase RegExp "^i.*?=[^\x{0905}\x{0906}\x{0907}\x{0908}].*$"
Replace All ""
Find MatchCase RegExp "^j.*?=[^\x{091c}\x{091c}\x{093c}\x{091d}].*$"
Replace All ""
Find MatchCase RegExp "^k.*?=[^\x{0915}\x{0915}\x{093c}\x{0916}\x{0916}\x{093c}].*$"
Replace All ""
Find MatchCase RegExp "^l.*?=[^\x{0932}].*$"
Replace All ""
Find MatchCase RegExp "^m.*?=[^\x{092e}].*$"
Replace All ""
Find MatchCase RegExp "^n.*?=[^\x{0928}].*$"
Replace All ""
Find MatchCase RegExp "^o.*?=[^\x{0913}\x{0906}\x{0911}\x{0909}\x{090a}].*$"
Replace All ""
Find MatchCase RegExp "^p.*?=[^\x{092a}\x{092b}\x{092b}\x{093c}].*$"
Replace All ""
Find MatchCase RegExp "^q.*?=[^\x{0915}\x{093c}\x{0915}].*$"
Replace All ""
Find MatchCase RegExp "^r.*?=[^\x{0930}\x{090b}\x{0939}\x{0943}].*$"
Replace All ""
Find MatchCase RegExp "^s.*?=[^\x{0938}\x{0936}\x{0937}].*$"
Replace All ""
Find MatchCase RegExp "^t.*?=[^\x{0924}\x{091f}\x{0925}\x{0920}].*$"
Replace All ""
Find MatchCase RegExp "^u.*?=[^\x{0905}\x{092f}\x{0909}\x{090a}].*$"
Replace All ""
Find MatchCase RegExp "^v*.?=[^\x{0935}]*.$"
Replace All ""
Find MatchCase RegExp "^w*.?=[^\x{0935}]*.$"
Replace All ""
Find MatchCase RegExp "^y*.?=[^\x{092f}]*.$"
Replace All ""
Find MatchCase RegExp "^z*.?=[^\x{091c}\x{093c}\x{091c}\x{091d}]*.$"
Replace All ""
The advantage of using Perl regular expression is the possibility to code the Unicode characters in ASCII with
\x{4-digit hex value} which makes it possible to code them in scripts easily (using my referenced script) or macros.
I think, with all the macros and scripts I wrote already for you, you should be already able to code such simple scripts/macros by yourself.
Edit: ZIP file with the recorded macro removed after reply by dictdoc.