这批文章总数(含英文9个)
我想把9取到。怎么样写oracle正则表达式?
------解决方案--------------------
SELECT LENGTH('12ABCD123') - LENGTH(REGEXP_REPLACE('12ABCD123', '[[:alpha:]]', ''))
FROM DUAL
------解决方案--------------------
select regexp_substr('asdfh9asdf','[[:digit:]]') from dual;
或
select regexp_substr('asdfh9asdf','\d') from dual;
------解决方案--------------------
select regexp_substr('这批文章总数(含英文9个)','\d+',1,1) as rt from dual