if( !editor.EnableTab ){ editor.EnableTab = true; alert( "Please run this macro again." ); Quit(); } sFind = prompt( "This macro extracts lines that do not 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 );