Add ~x.y.z and ^x.y.z parsing

this should be wrapped to 100 chars too