ap: fix sed expressions