当前位置: 代码迷 >> Oracle管理 >> 正则表达式解决办法
  详细解决方案

正则表达式解决办法

热度:10   发布时间:2016-04-24 05:25:38.0
正则表达式
select regexp_instr('but, soft! what light through yonder windows breaks?','l[[:alpha:]]{4}')
as result from dual中{4}是什么意思?
与select regexp_instr('but, soft! what light through yonder windows breaks?','l[[:alpha:]]')
as result from dual返回结果一致。

------解决方案--------------------
SQL code
select regexp_instr('but, soft! what light through yonder windows breaks?',                    'l[[:alpha:]]{4}') as result  --匹配l[[:alpha:]]{4}表示l后面有4个字母  from dual       select regexp_instr('but, soft! what light through yonder windows breaks?',                    'l[[:alpha:]]') as result   --匹配l[[:alpha:]]后面一个字母  from dual
  相关解决方案