如何从一个单元格中删除多个文本字符串?

时间:2019-12-28 07:35:10

标签: regex google-sheets google-sheets-formula

让我们说单元格A1包含:

Some fog eh Pop I've already heard the weather report Drive please Boy It's as thick as pea soup Not a soul around for miles Know what I think pop Perfect place for a murder Conversation like television set on honeymoon Unnecessary

我想删除单词theIIt'sasafor和{{1 }}。

似乎应该使用onREGEXREPLACE函数:

SUBSTITUTE

是否可以在search_for参数中插入多个值?我找不到关于此的任何文档...

2 个答案:

答案 0 :(得分:1)

看看是否可行

=REGEXREPLACE(A1,"\s\b(the|I|It's|as|a|for|on)\b",)

答案 1 :(得分:1)

尝试:

=REGEXREPLACE(A1, " the |I |It's | as | a | for | on ", " ")

0