change wildcard replacement in compile hook function