replace and generage xml beans based on regex lookup