The Shulchan Aruch · Orach Chayim
אורח חיים שפ״דOrach Chayim 384
Siman 384 of 697 in Orach Chayim — 2 se'ifim
הלכות ערוביןLaws of Eruvin· siman 384
Se’if 1א׳
עַכּוּ"ם הַנִּכְנָס לְשֵׁם אַכְסְנָאוּת, אִם נִכְנָס שֶׁלֹּא בִּרְשׁוּת אֵינוֹ אוֹסֵר לְעוֹלָם. וְאִם נִכְנָס בִּרְשׁוּת, אִם הוּא רָגִיל לָבֹא, אוֹסֵר מִיָּד; וְאִם אֵינוֹ רָגִיל, אֵינוֹ אוֹסֵר עַד לְאַחַר שְׁלֹשִׁים יוֹם.
A Non-Jewish Guest, Whether He Prevents [Carrying]. Containing 2 paragraphs: A non-Jew who enters as a guest: if he entered without permission, he never prevents [carrying]. If he entered with permission — if he regularly comes, he prevents [carrying] immediately. If he does not regularly come, he does not prevent [carrying] until after thirty days.
Se’if 2ב׳
אַנְשֵׁי חֵיל הַמֶּלֶךְ שֶׁנִּכְנְסוּ בְּבָתֵּי הַיְּהוּדִים, בֵּין בְּחָזְקָה בֵּין בְּרָצוֹן, אִם יֵשׁ לְבַעֲלֵי בָּתִּים בְּאוֹתָן מְקוֹמוֹת שֶׁנִּכְנְסוּ הָעַכּוּ"ם כֵּלִים שֶׁאָסוּר לְטַלְטְלָם בְּשַׁבָּת, אֵינָם אוֹסְרִים עֲלֵיהֶם.
The king's soldiers who entered into the homes of Jews, whether by force or willingly — if the homeowners have in those places where the non-Jews entered utensils that are forbidden to move on Shabbat, [the non-Jews] do not prevent [carrying] upon them.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0