<?php

$str = "Je connais ce con de conémi";

echo preg_replace("/(?<=\p{Z})con(?=\p{Z})/i", "###", $str);