// -*- ASCII:EDT -*- // deletes the innermost tag // (schlicht 20010529) ////////////////////////// BeginGroup; Mark(1); SaveFind; SetSearchCurrentDoc; SetSearchEntire(0); SetSearchForward(0); SetRegEx(1); SetSearchCaseSensitive(0); SetNotFoundNotify(1); SetFindTextSelect(1); SetFindStr("\<{+[a-zA-Z0-9]}|{!--}"); IfFound(!"> Mark(0);> GetSel(0,0);> SetRegEx(0);> SetSearchForward(1);> SearchReset;> IfStr('%!0',''');',> !'SetFindStr(''>'');> IfFound(''CMD(|Select From Mark|);'');> CMD(''Delete'');> ReplaceInString(''%!0'','''',0,0,0,0);> SetFindStr('''');> ');> IfFound('CMD(''Delete'');');> "); RestoreFind; Goto(1); EndGroup; End; /////////////////////////////////////////// // Of course both the start and the end tag // will be deleted. // It searches for the last start tag. I.e.: //

This shows how it works.

// ^(1) ^(2) // If the cursor is in position (1), //

&

will be removed, // if in position (2), // & will be removed. // // R Schlicht //////////////////////////////////////////// $Id: deleteTag.edt,v 1.2 2001-11-13 18:44:12+01 standard Exp standard $