问题、讲A010A中的10取出
--第一个方式to_number regexp_substr
SQL> select to_number(regexp_substr('A010A','[0-9]+')) from dual;
TO_NUMBER(REGEXP_SUBSTR('A010A
------------------------------
10
Executed in 0.016 seconds
--第二个方式、regexp_replace
SQL> select regexp_replace('010','^0','') from dual;
REGEXP_REPLACE('010','^0','')
-----------------------------
10
Executed in 0.031 seconds
oracle正则使用
原创
©著作权归作者所有:来自51CTO博客作者小傅哥的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
java 正则表达式匹配数字去掉前面的字符
java 正则表达式匹配数字去掉前面的字符
字符串 System 正则表达式 -
Java计算百分比保留整数
Java计算百分比保留整数的方法,提供了详细的代码示例,一看便懂。
四舍五入 Java Math