在特定字符后如何去除空格?

huangapple go评论157阅读模式
英文:

Spreadsheet] How do I remove whitespace after a specific character?

问题

B
Good morning,Good afternoon,Good evening
英文:

Overview

This function is used to translate Japanese into English.

A B
ja en
こんにちは,こんにちは,こんばんは =GOOGLETRANSLATE($A2,$B$1,A$1)

B2 will output the following

B
Good morining, Good afternoon, Good evening

What I want to achieve

I would like to have the output with only the whitespace appearing after the comma removed as follows.

B
Good morining,Good afternoon,Good evening

I found some parts that did not work with all spaces gone or full-width characters, so if you could tell me how to do the above, that would be great.

答案1

得分: 1

如Tanaike上面所描述的,使用REGEXREPLACE()很容易实现。将其设置为将, 替换为, ,逗号后面的空格将消失。

点击这里查看它的实际效果。

英文:

As Tanaike described above, it is easy to do that with REGEXREPLACE(). Set it to replace , s with ,, and the spaces after commas will go away.

Click here to see it in action.

huangapple
  • 本文由 发表于 2023年6月29日 11:04:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76577827.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定