Replace %as with %ms