------解决方案-------------------- select regexp_replace('MABC','^M(.)*','') from dual
------解决方案--------------------
WITH T AS (
SELECT 'M234234324' AS M FROM DUAL UNION ALL
SELECT '123214214' FROM DUAL UNION ALL
SELECT '324234MSDFDSF' FROM DUAL
)
SELECT * FROM T WHERE REGEXP_LIKE(M,'^M'); ------解决方案--------------------
WITH T AS (
SELECT 'M234234324' AS M FROM DUAL UNION ALL
SELECT '123214214' FROM DUAL UNION ALL
SELECT '324234MSDFDSF' FROM DUAL
)
---^符号表示一个正则表达式的开始,下面正则意思是以M为开头的
--如果^符号出现在[]里面第一个的话,则代表"非"
SELECT * FROM T WHERE REGEXP_LIKE(M,'^M');