regex - bigquery 中 regexp_replace 结果的条件规则
问题描述
我正在编写一个 bigquery 标准 sql 语句,我想保留字母数字和连字符,同时删除空格和所有其他字符,这很容易:
REGEXP_REPLACE(field_1, '[^0-9a-zA-Z-]','')
但是,如果由于这个正则表达式,两个数字之前没有接触,我希望它们用“@”分隔。
示例:
“他的体重是 2……1”--> hisweightis2@1
“他的体重现在是 2 1”--> hisweightis2@1now
“他的体重是 2-1 或多或少”--> hisweightis2 -1moreorless
"他的体重现在是 21 和 3" --> hisweightis21and3now
解决方案
推荐阅读
- reactjs - 覆盖材料表中的 MuiTable-root 类
- unity3d - 我在 Unity 中,我导入了一个新的 appodeal sdk,我收到此错误:清单合并失败并出现错误
- angular - 如何从服务调用方法到控制器 Ionic
- php - PHP用特殊字符解密
- google-apps-script - dblclick SelectionInput 卡片脚本服务
- javascript - ScriptTagInput 类型的变量 $input!提供了无效值
- serenity-platform - Q.reloadLookup() 与新的一组 FilterField
- asp.net - 使用参数 .Net Core 调用操作
- javascript - 在 JavaScript/Flickity 时间线轮播上的导航按钮/链接上设置选定的类
- javascript - Fabric js没有从SVG加载图像