Hello,
I downloaded the script from /modules/mydownloads/singlefile.php?cid=8&lid=169 and when using it I noticed that it treats lower cases and capital letters different.
example:
If you have a list…
hello
Hello
heLLo
You use the script to extract ‘hello’, you will only get the ‘hello’ with the lower cases.
How can I change this so the script treats all letters equal?
if( !editor.EnableTab ){
editor.EnableTab = true;
alert( "Please run this macro again." );
Quit();
}
sFind = prompt( "This macro extracts lines that do contain the specified string:", "" );
if( sFind == "" ){
Quit();
}
Redraw = false;
docSearch = editor.ActiveDocument;
editor.NewFile();
docResult = editor.ActiveDocument;
docSearch.Activate();
docSearch.selection.StartOfDocument();
y = 1;
do {
docSearch.selection.SetActivePoint( eePosLogical, 1, y );
if( y != docSearch.selection.GetActivePointY( eePosLogical ) ) break;
docSearch.selection.SelectLine();
sLine = docSearch.selection.Text;
re = new RegExp( ".*" + sFind + ".*" );
result = re.test( sLine );
if( result ){
docResult.Activate();
docResult.selection.Text = sLine;
}
docSearch.Activate();
y++;
} while( true );
thanks!