“All is not lost, and while some part remains, everything may be regained.”
H. Rider Haggard wrote this in Cleopatra.
Where it appears
“Nay, Sire,” I answered. “If thou dost yield, then art thou doomed. All last night I questioned of the Fates concerning thee, and I saw this: when thy star draws near to Caesar’s it pales and is swallowed up; but when it passes from his radiance, then bright and big it shines, equal in glory to his own. All is not lost, and while some part remains, everything may be regained. Egypt can yet be held, armies can still be raised. Caesar has withdrawn himself; he is not yet at the gates of Alexandria, and perchance may be appeased. Thy mind in its fever has fired thy body; thou art sick and canst not judge aright. See, here, I have a potion that shall make thee whole, for I am well skilled in the art of medicine,” and I held out the phial.
From the public-domain edition, read it free.