Controlled pH Extraction in the Separation of Weak Acids and Bases