Hi,
I have just started using UEStudio and I am testing some functionalities of UEStudio version 20.0.0.50.
I want to select all text (and all lines) between two HTML tags with the tags included like <nav sometext and </nav>. There are plenty of solutions to do that, but Perl is my friend and so I use this syntax: (?s)^<nav sometext.*</nav> to select the desired text. (?s) means that dot don't stop at newline, so the search continues on next line.
So the problem begins when I am using file with plenty of lines (> 2000 lines for example), with small file no problem by using script or by using the find selection.
Sample of script:
The find seems to be lost with the file attached, see attached bug1.zip.
Any idea why?
Terry
I have just started using UEStudio and I am testing some functionalities of UEStudio version 20.0.0.50.
I want to select all text (and all lines) between two HTML tags with the tags included like <nav sometext and </nav>. There are plenty of solutions to do that, but Perl is my friend and so I use this syntax: (?s)^<nav sometext.*</nav> to select the desired text. (?s) means that dot don't stop at newline, so the search continues on next line.
So the problem begins when I am using file with plenty of lines (> 2000 lines for example), with small file no problem by using script or by using the find selection.
Sample of script:
Code: Select all
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.matchCase=false;
UltraEdit.activeDocument.findReplace.matchWord=false;
UltraEdit.activeDocument.findReplace.searchAscii=false;
UltraEdit.activeDocument.findReplace.searchDown=true;
UltraEdit.activeDocument.findReplace.searchInColumn=false;
UltraEdit.perlReOn();
UltraEdit.activeDocument.findReplace.mode = 0;
UltraEdit.activeDocument.findReplace.regExp = true;
var pattern = '(?s)^<nav id="course-timeline".*</nav>$'
UltraEdit.activeDocument.findReplace.find(pattern);
UltraEdit.outputWindow.write('before' + UltraEdit.activeDocument.isFound());
UltraEdit.outputWindow.write(UltraEdit.activeDocument.selection);
UltraEdit.outputWindow.write('after');
Any idea why?
Terry
- bug1.zip (24.45 KiB) 0
- sample of text file to analyse the problem