我正在使用 Oracle DB,我正在尝试查找并提取与特定模式匹配的字符串中的所有事件......
它应该是 3 个字母,3 个数字,然后可能是一个字母或不是
我试过这个:
SELECT REGEXP_SUBSTR(my_column, '[A-Za-z]{3}(\d)(\d)(\d)') AS values
FROM my_table
但它只返回第一次出现。
使用
REGEXP_SUBSTR(my_column, '[A-Za-z]{3}(\d)(\d)(\d)', 0, 0, 'i')
也不起作用
有人有什么想法吗?
编辑:
我正在尝试从 PLSQL 文件中提取它。所以它很像 SQL 查询
select *
from abc123
where some_value = 'some_value'