我从另一篇文章中得到了以下查询,但似乎不适用于单个字符。
SELECT regexp_substr('abc
def
ghi', '.+[[:alpha:]]', 1 ,level)
FROM dual
CONNECT BY regexp_substr('abc
def
ghi', '.+[[:alpha:]]', 1 ,level) IS NOT NULL;
输出
abc
def
ghi
当我为单个字符尝试此操作时,它无法按预期工作。
SELECT regexp_substr('a
b
c', '.+[[:alpha:]]', 1 ,level)
FROM dual
CONNECT BY regexp_substr('a
b
c', '.+[[:alpha:]]', 1 ,level) IS NOT NULL;