Jeremiah 31:15
13 The Lord says, ‘At that time young women will dance and be glad. Young men and old men will rejoice. I will turn their grief into gladness. I will give them comfort and joy in place of their sorrow. 14 I will provide the priests with abundant provisions. My people will be filled to the full with the good things I provide.’ 15 The Lord says: “A sound is heard in Ramah, a sound of crying in bitter grief. It is the sound of Rachel weeping for her children and refusing to be comforted, because her children are gone.” 16 The Lord says to her, “Stop crying! Do not shed any more tears. For your heartfelt repentance will be rewarded. Your children will return from the land of the enemy. I, the Lord, affirm it! 17 Indeed, there is hope for your posterity. Your children will return to their own territory. I, the Lord, affirm it!
Matthew 2:18
16 When Herod saw that he had been tricked by the wise men, he became enraged. He sent men to kill all the children in Bethlehem and throughout the surrounding region from the age of two and under, according to the time he had learned from the wise men. 17 Then what was spoken by Jeremiah the prophet was fulfilled: 18 “A voice was heard in Ramah, weeping and loud wailing, Rachel weeping for her children, and she did not want to be comforted, because they were gone.” 19 After Herod had died, an angel of the Lord appeared in a dream to Joseph in Egypt 20 saying, “Get up, take the child and his mother, and go to the land of Israel, for those who were seeking the child’s life are dead.”
Notes and References
"... As the flow of the narrative continues to be followed, after Matthew records the Hosea quotation, he goes on to recount Herod’s explosive response to the magi’s failure to return. The young boys of Bethlehem and the surrounding area are murdered, a scene that strikingly resembles the murder of the Israelite boys under Pharaoh. Additionally important to recall is the prior discussion of Jewish literature undertaken in detail above that revealed various further exodus traditions that Matthew has utilized in his portrayal of Jesus in this narrative. After narrating the tragic death of the Bethlehem boys, Matthew then notes another fulfillment that this event corresponds to, utilizing a quotation from Jeremiah 31:15 (LXX 38:15) that highlights the oppression motif that has dominated the entirety of Matthew chapter 2. The quotation, as it appears within the context of Jeremiah 31, refers to the exile of the people when many had been killed and others were forced to leave the land. The oppression and sorrow of the exilic period is highlighted throughout the book of Jeremiah, as well as in the book of Lamentations, traditionally attributed to Jeremiah. Nevertheless, the utilization of the quotation in Matthew should be observed as remaining within the overall exodus motif that the entire narrative continues to maintain. Structurally this can be argued by observing again the placement of the quotation, occurring as it does between the parallel of verses 14 and 21 that record the literal going to Egypt and subsequent return to the land ..."
Kennedy, Joel The Recapitulation of Israel: Use of Israel’s History in Matthew 1:1-4:11 (pp. 147-148) Mohr Siebeck, 2008