如何在 google sheet 中拆分具有用户条件(如“\t 和 \n”)的单元格?

How to split the cell with user condition like "\t and \n" in google sheet?

我的数据是这样的:

客户姓名:\tAAA \n\n 客户电子邮件:\tAAA@b.com \n\n 客户手机:\t12456788 \n\n 客户留言:\n\n\ taaabbbcccmessage

我想像这样转换数据:

AAA AAA@b.com 12456788 aaabbbcccmessage 在单独的单元格中。

我试过这个公式但没有用:

ARRAYFORMULA(split(join(":",index(split(C16,":"),1,1),index(split(C16,":"),1,2),index(split(C16,":"),1,3),index(split(C16,":"),1,4)),":"))

发生错误:

arrayformula(split(join(index(split(C16,"Customer Name:\t")),index(split(C16,"Customer Email:\t")))))

请试试这个公式作为起点:

=SPLIT(REGEXREPLACE(B35,"\t|\n","$"),"$",1)

  • $
  • 替换字符串的重复部分
  • 将结果除以 $