根据另一个单元格的子字符串创建公式

Create formula based on substrings from another cell

通常 Google 表格中的论坛没问题。到目前为止,这让我很困惑。作为输入,有一堆包含下划线的小写名称。如何将该输入翻译成方法名称?我想不出一个好的方法来做到这一点

input                               output needed
api_account_registration_post       PostAccountRegistration
api_account_put                     PutAccount
api_account_upgrade_put             PutAccountUpgrade
api_account_image_put               PutAccountImage
api_account_image_get               GetAccountImage
api_account_image_delete            DeleteAccountImage

尝试:

=INDEX(SUBSTITUTE(PROPER(SUBSTITUTE(
 REGEXREPLACE(A2:A, "^api_", ), "_", " ")), " ", ))