sql - 如何在Google bigquery中替换1-127范围以外的ASCII字符?

标签 sql regex google-bigquery

我有一个要求,希望替换 ASCII 字符范围 1-127 以外的字符。

下面是oracle的实现:

REGEXP_REPLACE(Student_Address, '[^' || CHR(1) || '-' || CHR(127) || ']','') 

您能否提供 Bigquery 等效解决方案。

最佳答案

使用下面

REGEXP_REPLACE(Student_Address, r'[^[:ascii:]]', '')

关于sql - 如何在Google bigquery中替换1-127范围以外的ASCII字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60957833/

相关文章:

mysql - SQL - 按 "human"相关性排名或排序

regex - 正则表达式 - 读取直到第一次遇到冒号 ( :) and ignoring the rest of the line and the number part in the beginning

sql - BigQuery 根据(Array CONTAINED IN Array)条件连接 2 个表

python - bigquery 数据流错误 : Cannot read and write in different locations while reading and writing in EU

sql - 在分区上排序 string_agg |大查询

sql - Oracle 将列显示为行

sql - PostgreSQL中的for循环调用API

c# - 为 SQL WHERE 子句构建安全搜索条件

regex - 通过混合使用语法和正则表达式模式搜索字符串

java - 如何使用正则表达式验证字符串中两个字符之间没有空格