Substitution of hydrogen in an acid by a metal