sql - 查找所有非常规的单引号
问题描述
我想从具有非常规撇号字符的列(姓氏)中获取所有记录。
即,,,U+2019
(U+2018
还有U+201B
什么?)
解决方案
您可以使用正则表达式类来过滤这样的行:
select * from table where regexp_like(last_name, '[‘’`´‘’‛′‵]')
或者如果您不想直接在字符串中使用 unicode 字符:
select * from table where regexp_like(last_name, '[' || unistr('\2018\2019\201B`\00B4\2032\2035') || ']')
在 unicode 中可以找到更多非常规的单引号:https ://en.wikipedia.org/wiki/General_Punctuation
请注意一些https://en.wikipedia.org/wiki/Combining_Diacritical_Marks,因为它们可以与空格组合以使其看起来像引号。
推荐阅读
- mfc - 通过引用使用 CString 参数调用函数时出错
- java - 在 Spring 中实现后台进程
- java - 如何通过 Selenium 和 Java 定位多个元素在相同标签中具有相同 ID、名称和属性的元素
- javascript - React Native 自定义 TextInput 占位符
- mongodb - IntelliJ 中的 Mongo Explorer 不显示集合
- mongodb - Mongoose:如何在 Object 中插入新字段?
- regex - 正则表达式 - 从专有名称中提取 OU
- node.js - 只用nodejs从mongodb获取一部分数据
- javascript - Puppeteer,监听网络响应变化
- c# - C#_EventLog 异常