the one who gets back the charity is like a dog who swallows its vomit
Umar ibn Khattab (Allah be pleased with him) reported:
I donated a pedigree horse in the path of Allah. Its possessor made it languish. I thought that he would sell it at a cheap price. I asked Allah's Messenger (may the peace and blessings of Allah be upon him) about it, whereupon he said: Don't buy it and do not get back your charity, for the one who gets back the charity is like a dog who swallows its vomit.
If it were not for the favor of the Lord, man would not have donated, because he is stingy by nature, indeed the benevolence is from Allah the most generous.
The donator who really knows Allah, will consider himself but a helper. He who holds himself accountable will do his best to purify it from stinginess, and consider it indispensable for his salvation.
The most honored of the people are the prophets, and the most honored of the prophets is Muhammad may the peace and blessings of Allah be upon them all. He was keen to attain the rewards of the good deeds.
In principle: one can not withdraw his gift with the exception of the father who may take back his gift from his son according to the view the Maliki school of thought.
As for charity, there is no difference of opinion among the scholars that is it prohibited to be taken back under any circumstances; it is no longer the property of the one who spent it for the sake of Allah.