#### Find a string then delete the chars from the beginning of it to a char specified #Create MadEdit Object for active edit medit = MadEdit() #Restore caret position res = 1 while res != 0: res = medit.FindTextNext("AAAA", False, False, False, -1, -1) if res != 0: pos1 = medit.GetSelectionBeginPos() res = medit.FindHexNext("A1A1", -1, -1) if res != 0: pos2 = medit.GetSelectionBeginPos() medit.SetSelection(pos1, pos2, True) medit.Delete() medit.InsertStr("\n\n")