【问题标题】:How to extract word between number and a comma in a string如何提取字符串中数字和逗号之间的单词
【发布时间】:2021-07-25 07:33:36
【问题描述】:

如何在 googlesheet 中提取“Seri Kembangan”?

Farm In The City, Lot 40187-40188, Jalan Tropika Barat 1, Pusat Bandar Putra Permai, 43300 Seri Kembangan, 雪兰莪

【问题讨论】:

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


    【解决方案1】:

    尝试:

    =REGEXEXTRACT(A1, "\d+ (.+),")
    

    【讨论】:

    • 谢谢!你能解释一下为什么它没有在摘录中包含邮政编码吗?
    • @FH 当然,正则表达式的意思是:提取 .+ 之间的所有内容 (.+) 数字 \d+ foflowed by space ` ` 和逗号 ,。如果你也想提取 43300,你可以使用:=REGEXEXTRACT(A1, "(\d+ .+),")
    【解决方案2】:

    试试:

    =regexextract(A1,"\d\ (.*),")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-10
      相关资源
      最近更新 更多