Effect of functional group structure and exchange capacity on the selectivity of anion exchangers for divalent anions