Exodus 21:22-23
And if men strive together, and hurt a woman with child, so that her fetus departs, and yet no harm follow, he shall surely be fined, according as the woman's husband shall levy upon him; and he shall pay as the judges determine.
But if any harm follow, then you shall give life for life, eye for eye, tooth for tooth, hand for hand, foot for foot.
Commentary on Exodus in the Mekhilta of Rav Ishamael:
"You shall give life for life" -- this means you must compensate a life for a life, but you may not compensate a life with money.
Rav Judah the Patriarch says: "This implies monetary compensation."
You claim this implies only monetary compensation? Perhaps it permits only death?
Said the Rabbi: Just attend to Scripture's terminology: here, in discussing compensation, the term "determine" is used and elsewhere (Exodus 21:30, where monetary damage is permitted for damage to cattle) "determine" is also used. Just as there the reference is to monetary compensation, so here!
Perhaps it really means taking out his eye?
Rabbi Ishmael would say: Indeed, Scripture says "One who kills an animal shall make restitution, but one who kills a human being shall be put to death" (Leviticus 24:21). Scripture has juxtaposed damages to cattle with damages to a human . . . Accordingly just as damages to cattle are compensated by money, so too damages to humans are compensated by money."
Modern commentary: "eye for eye" -- This law of retaliation existed among ancient peoples, and persists to our own day in capital punishment. In the Torah, likewise, this law of "measure for measure" is carried out literally only in the case of murder . . . Hence, it is evident that other physical injuries which are not fatal are a matter of monetary compensation for the injured party. Such monetary compensation, however, had to be equitable, and as far as possible equivalent. This is the meaning of of the legal technical terms, "eye for eye, tooth for tooth."