replace | with \mid