The selective demethylation of quaternary ammonium salts