sql - 如何使用正则表达式在 Oracle 中提取括号外的单词?
问题描述
我想从列中提取括号外的值。
询问:
select dwn_notes from down_time;
查询结果:
4 hour scheduled downtime (dball, 01/04/2019 09:14)
4 hour scheduled downtime (dball, 01/04/2019 09:14)
4 hour scheduled downtime (dball, 01/04/2019 09:14)
4 hour scheduled downtime (dball, 01/04/2019 09:14)
解决方案
这将起作用:
select regexp_replace(down_notes,'[(]{1}(.)*[)]{1}','') from Table1;
推荐阅读
- c# - 使用多态获取相同类型的实例
- swift - 带有键值的 Swift 字符串,这种格式标准吗?我怎样才能得到它作为字典?
- arm - 如何从startup.s导入标识符(到main.c)
- xamarin.forms - Xamarin 表单 SfDataGrid 自定义映射
- html - 图标不会显示在台式计算机的页脚中
- node.js - Gatsby 站点在构建期间不可用
- android - 如果绑定适配器提供了 getter,请检查适配器是否正确注释以及参数类型是否匹配
- python-3.x - 优先级相同时python PriorityQueue添加对象失败
- lambda - 如何在 Python 中使用 lambda 函数生成随机的整数元组?
- git - 如何创建通过 Git GUI 打开本地 repo 的快捷方式?