Register a custom replacement code and group