Verse 24: And they burnt the city with fire, and all that was therein: (Josh. 6:19) only the silver, and the gold, and the vessels of brass and of iron, they put into the treasury of the house of the LORD.
Verse 25: And Joshua saved Rahab the harlot alive, and her father’s household, and all that she had; and (see Matt. 1:5) she dwelleth in Israel even unto this day; because she hid the messengers, which Joshua sent to spy out Jericho.
[And he caused to live, הֶחֱיָה] He vivified, that is, he preserved unharmed (Vatablus, similarly Masius, Drusius, Lapide). Others: he gave a livelihood, that is, fields and possessions whence they might be able to sustain life (Kimchi in Masius). Question: How were they able to preserve her against the commandments of God, Exodus 23; 34? Responses: 1. That Law was to be moderated by this equity, that unto those that might seek peace, and abjure their false gods, it might not pertain. See more on Joshua 11 (Masius). It was dispensed with here (Lapide).
And Joshua saved Rahab the harlot alive, etc.: For that general command of rooting out the Canaanites seems to have had some exception, in case any of them had sincerely and seasonably cast off their idolatry and wickedness, and submitted themselves to the Israelites, as we shall see hereafter.
[Unto the present day] There is a similar thing in Joshua 4:9. Was this added by Joshua, or by Ezra (Grotius)?
 Hebrew: וְהָעִ֛יר שָׂרְפ֥וּ בָאֵ֖שׁ וְכָל־אֲשֶׁר־בָּ֑הּ רַ֣ק׀ הַכֶּ֣סֶף וְהַזָּהָ֗ב וּכְלֵ֤י הַנְּחֹ֙שֶׁת֙ וְהַבַּרְזֶ֔ל נָתְנ֖וּ אוֹצַ֥ר בֵּית־יְהוָֽה׃
 Hebrew: וְֽאֶת־רָחָ֣ב הַ֠זּוֹנָה וְאֶת־בֵּ֙ית אָבִ֤יהָ וְאֶת־כָּל־אֲשֶׁר־לָהּ֙ הֶחֱיָ֣ה יְהוֹשֻׁ֔עַ וַ֙תֵּשֶׁב֙ בְּקֶ֣רֶב יִשְׂרָאֵ֔ל עַ֖ד הַיּ֣וֹם הַזֶּ֑ה כִּ֤י הֶחְבִּ֙יאָה֙ אֶת־הַמַּלְאָכִ֔ים אֲשֶׁר־שָׁלַ֥ח יְהוֹשֻׁ֖עַ לְרַגֵּ֥ל אֶת־יְרִיחֽוֹ׃
 Here חָיָה, to live, is in the Hiphil conjugation, which frequently conveys a causative sense.