locate: handle more "complexe" patterns