How would you separate a molecular compound from an ionic compound?

Many molecular compounds are not soluble in water but are soluble in non-polar solvents. Many ionic compounds are soluble in water (polar solvent) but not in non-polar solvents. A very broad question for there is no information about the phase of this system; i.e., liquid, solid, gas.