Ionic liquids as solvents for the regioselective O-alkylation of C/O ambident nucleophiles.