Mishneh Torah — Negative Mitzvot מצוות לא תעשה, Chapter 353
The full Hebrew text of Mishneh Torah, Negative Mitzvot, Chapter 353, with English translation by Maimonides (Rambam).
שלא ליקרב לעריות בדברים המביאין לידי גילוי ערווה, כגון חיבוק ונישוק ורמיזה וקפיצה, שנאמר "אל כל שאר בשרו, לא תקרבו לגלות ערווה" (ויקרא יח,ו); מפי השמועה למדו שזו אזהרה לקריבה המביאה לידי גילוי ערווה.
Not to be intimate with a woman with whom sexual relations are forbidden in matters that might lead to intercourse - e.g., embracing, kissing, winks, or signs - as [Leviticus 18:6] states: "No person shall approach a close relative to commit a sexual offense.” Based on the oral tradition, we have learned that this prohibits intimacy that might lead to sexual relations .