日期:2014-05-17 浏览次数:20900 次
select to_number(regexp_substr('A01','[0-9]+')) from dual; /* 1 */
------解决方案--------------------
--如果有小數 select to_number(regexp_substr('A01.3','[0-9]+[.]?[0-9]*')) from dual; /* 1.3 */
------解决方案--------------------
select regexp_replace('01', '^0', '') from dual; select regexp_replace('01234', '^0', '') from dual; select regexp_replace('1234', '^0', '') from dual;
------解决方案--------------------
select regexp_replace('A01', '^[a-zA-Z0]+', '') from dual;
select regexp_replace('A01234', '^[a-zA-Z0]+', '') from dual;