כִּ֣י יִפָּלֵא֩ מִמְּךָ֨ דָבָ֜ר לַמִּשְׁפָּ֗ט בֵּֽין־דָּ֨ם לְדָ֜ם בֵּֽין־דִּ֣ין לְדִ֗ין וּבֵ֥ין נֶ֙גַע֙ לָנֶ֔גַע דִּבְרֵ֥י רִיבֹ֖ת בִּשְׁעָרֶ֑יךָ וְקַמְתָּ֣ וְעָלִ֔יתָ אֶ֨ל־הַמָּק֔וֹם אֲשֶׁ֥ר יִבְחַ֛ר יְהֹוָ֥ה אֱלֹהֶ֖יךָ בּֽוֹ׃
If a case is too baffling for you to decide, be it a controversy over homicide, civil law, or assault—matters of dispute in your courts—you shall promptly repair to the place that the Eternal your God will have chosen,
Torah Temimah points to Sanhedrin / Nega’im on “bein nega le-nega.”
ובין נגע לנגע. בין נגעי אדם לנגעי בתים, בין נגעי בגדים לנגעי בתים.
English: “And between affliction and affliction” — between the afflictions of a person and the afflictions of houses; between the afflictions of garments and the afflictions of houses.
The phrase covers the difficult distinctions among the various categories of tzara’at (person, garment, house).
Derash on the verse (Bavli / Sifrei) — not a formal named middah of the 13. The doubled language points to borderline cases of negaim.
Cases that turn on fine distinctions among the different forms of tzara’at may be referred to the high court.