Hello Everyone,
I'm working on code that will find occurences of strings that begin with "." and copy them to a new file.
The piece I'm working on now finds the lines that begin with a period, though it doesn't seem to work. The regex finds *all* occurences of periods.
Code below:
I'm working on code that will find occurences of strings that begin with "." and copy them to a new file.
The piece I'm working on now finds the lines that begin with a period, though it doesn't seem to work. The regex finds *all* occurences of periods.
Code below:
Code: Select all
UltraEdit.perlReOn();
UltraEdit.activeDocument.findReplace.regExp = true;
UltraEdit.activeDocument.findReplace.replaceAll = true;
var regexpFind = "^\.";
UltraEdit.activeDocument.top();
//UltraEdit.activeDocument.findReplace.find(regexpFind);
while ( (UltraEdit.activeDocument.findReplace.find(regexpFind)) && ! UltraEdit.activeDocument.isEof() )
{
//UltraEdit.outputWindow.write("found")
renumberValue++;
}
UltraEdit.outputWindow.write("Value is:"+renumberValue);
//UltraEdit.newFile();
//UltraEdit.activeDocument.top();
//UltraEdit.activeDocument.write("hi");