Strip only if prefix is provided.