You need to enable JavaScript to run this app. 如何使用Google Sheets REGEXEXTRACT提取逗号与分号间的行内多段字符串?
优惠活动
大模型
产品
解决方案
定价
更多

如何使用Google Sheets REGEXEXTRACT提取逗号与分号间的行内多段字符串?

需求与现有问题

我希望使用Google Sheets的REGEXEXTRACT函数,提取不同分隔字符之间的目标字符串,需要兼容同一行存在重复子句的提取场景,当前涉及3类输入样本:

67fa9,extract this text;

f19b,extract this text,and this text with the comma or with out;

;f19b,extract this text,and this text with the previous comma or with out;;f4241c,extract this text which may contain a integer from 0-9;

我目前尝试使用的公式为 REGEXEXTRACT(A2,",.*?;"),但该公式无法适配A列的全部场景。
对应的预期输出效果参考如下:
enter image description here


内容的提问来源于stack exchange,提问作者TAHIR

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.11.12 19:36:07