><> (Fish), 145 107 bytes
This answer uses ><>'s jumping instruction to fix the problem.
!<0078*+00~..>0[!."r43a*+8a+&{ee+00&1-:&(?.~~ol?!;4b*0.0f<>0['r3d*159*+&}7a*00&1-:&(?.~~ol?!;68a*+0.0+*a58
This quine actually contains two different quine generators. It starts with some jumping logic and by default uses the left quine. If a character is removed from the jumping logic or from the left quine, the program jumps to the right quine.
You can try it here
Explanation
The code can be dissected into a few parts:
A: !<0078*+00~..>0[!.
B: >0[!."r43a*+8a+&{ee+00&1-:&(?.~~ol?!;4b*0.
C: .0f<
D: >0['r3d*159*+&}7a*00&1-:&(?.~~ol?!;68a*+0.
E: .0+*a58
Explanation of the different parts:
- A: Jumps to the right of C. If any character is deleted from from A,
this jumps to the left of D or the right of E, triggering the second
quine.
If any character is deleted from B or C, the code is shifted 1
character to the left, causing this to jump to the left of D.
- C: This code jumps to the left of B.
- B: Quine #1
- D: Quine #2
- E: Jumps to the left of D
Explanation of the quine (with #1 as example):
Once the instruction pointer reaches either of the quines, you're certain that that quine is completely intact.
>0[!. //Fix the instruction pointer's direction and empty the stack (The '!.' is a leftover from codepart A)
"r43a*+ //Start reading all of the code and add the '"' character to the stack
8a+& //Because the quine started reading at the 19th character instead of the first, the stack has to move 18 characters.
//This part saves the number 18 to the register.
{ee+00&1-:&(?. //Move the stack one to the left, decrease the stack by 1. If the stack is not empty yet, jump back to the start of this section.
~~ //Clean the temporary variables from the stack. It should now contain the whole quine.
ol?!;4b*0. //Print the first character from the stack. As long as the stack isn't empty, jump back to the start of this section.
AB
should outputAB
. \$\endgroup\$