"And they strike a pregnant woman" (Exodus 21:22). Abba Chanan in the name of Rabbi Eliezer says: what does Scripture teach by this? Since it says, "and her offspring come out," we have already learned that she is pregnant; so what does Scripture teach by saying "pregnant"? Rather, if he struck her on her head or on one of her other limbs, I might think he should be liable for the offspring; Scripture therefore says "pregnant," teaching that he is not liable until he strikes her in the place of her pregnancy.
Liable Only When the Blow Lands Where the Child Is Carried
Yalkut Shimoni on Torah 335:6
וְנָגְפוּ אִשָּׁה הָרָה, אַבָּא חָנָן מִשּׁוּם רַבִּי אֱלִיעֶזֶר אוֹמֵר, מַה תַּלְמוּד לוֹמַר. לְפִי שֶׁהוּא אוֹמֵר וְיָצְאוּ יְלָדֶיהָ הָא לָמַדְנוּ שֶׁהִיא הָרָה, וּמַה תַּלְמוּד לוֹמַר הָרָה, אֶלָּא אִם הִכָּה עַל רֹאשָׁהּ אוֹ עַל אֶחָד מֵאֵבָרֶיהָ שׁוֹמֵעַ אֲנִי יְהֵא חַיָּב, תַּלְמוּד לוֹמַר הָרָה, מַגִּיד שֶׁאֵינוֹ חַיָּב עַד שֶׁיַּכֶּנָּה בִּמְקוֹם עִבּוּרָהּ.