regexp_instr
来源:互联网 发布:电子阅览室软件配置 编辑:程序博客网 时间:2024/06/06 21:00
SQL> select *from a98;
ID ADDRESS
---------- ---------------
2 abc1
1 1abc
SQL> select * from a98
2 where regexp_instr (address,'[^[:alpha:]]') = 1;
ID ADDRESS
---------- --------------------
1 1abc
SQL> select * from a98
2 where regexp_instr (address,'[:alpha:]') = 1;
ID ADDRESS
---------- --------------------
2 abc1
= 1 表是匹配第几个字符
REGEXP_INSTR 有6个参数:
第一个是输入的字符串 (上面的字段address) 第二个是正则表达式
第三个是标识从第几个字符开始正则表达式匹配。(默认为1)
第四个是标识第几个匹配组。(默认为1)
第五个是指定返回值的类型,如果该参数为0,则返回值为匹配位置的第一个字符,如果该值为
非0则返回匹配值的最后一个位置。
第六个是是取值范围:
i:大小写不敏感; c:大小写敏感; n:点号 . 不匹配换行符号;
m:多行模式; x:扩展模式,忽略正则表达式中的空白字符。
正则表达式规则: [^. . .] --- A “not equals” bracket expression
| --- Logical OR.
. --- Match any character in the database character set.
$ --- End of line anchor
^ --- Beginning of line anchor.
+ ---Match one or more occurrences of the preceding subexpression.
[^Ale|ax.r$]
[]表示一个字符组,在字符组里,. | $只表是本身的字符,已经不是正则里的元字符了,且^只有在开头,才表示非
[^Ale|ax.r$]这个正则表示的意义是字符串里存在除了A、l、e、|、a 、x、.、r、$之外的字符
------------------------------------------------------------------------------------------------------
select regexp_instr('Alex','[^Ale|ax.r$]') from dual;
REGEXP_INSTR('ALEX','[^ALE|AX.R$]')
-----------------------------------
0
select regexp_instr('Alax','[^Ale|ax.r$]') from dual;
REGEXP_INSTR('ALAX','[^ALE|AX.R$]')
-----------------------------------
0
select regexp_instr('Alxer','[^Ale|ax.r$]') from dual;
REGEXP_INSTR('ALXER','[^ALE|AX.R$]')
------------------------------------
0
select regexp_instr('Alaxendar','[^Ale|ax.r$]') from dual;
REGEXP_INSTR('ALAXENDAR','[^ALE|AX.R$]')
----------------------------------------
6
select regexp_instr('Alexender','[^Ale|ax.r$]') from dual;
REGEXP_INSTR('ALEXENDER','[^ALE|AX.R$]')
----------------------------------------
6
- REGEXP_INSTR
- regexp_instr
- oracle regexp_instr
- OCP-047 REGEXP_INSTR()
- regexp_like、regexp_substr、regexp_instr、regexp_replace
- REGEXP_LIKE,REGEXP_INSTR,REGEXP_SUBSTR,REGEXP_REPLACE 用法
- Oracle REGEXP_INSTR 用法
- oracle中的正则表达式函数regexp_instr
- REGEXP_INSTR :与INSTR的功能相似
- Oracle的REGEXP_INSTR函数简单用法
- Oracle正则表达式函数:regexp_like、regexp_substr、regexp_instr、regexp_replace
- Oracle正则表达式函数:regexp_like、regexp_substr、regexp_instr、regexp_replace
- Oracle正则表达式函数:regexp_like、regexp_substr、regexp_instr、regexp_replace
- Oracle正则表达式函数:regexp_like、regexp_substr、regexp_instr、regexp_replace
- Oracle正则表达式函数:regexp_like、regexp_substr、regexp_instr、regexp_replace
- Oracle正则表达式函数:regexp_like、regexp_substr、regexp_instr、regexp_replace
- Oracle正规则函数的用法,regexp_substr,REGEXP_LIKE,REGEXP_INSTR,REGEXP_REPLACE
- Oracle正则表达式函数:regexp_like、regexp_substr、regexp_instr、regexp_replace(转载保存一下)
- 打造完整生态系统 微软Surface手机曝光
- FastDFS的配置、部署与API使用解读(3)以流的方式上传文件的客户端代码
- 有点坑爹的一些问题
- linvx中vi编辑器的使用
- ubuntu装RTL8111/8168B网卡驱动
- regexp_instr
- C#4.0新特性(1):Dynamic Lookup 动态查找
- FastDFS的配置、部署与API使用解读(4)FastDFS配置详解之Client配置
- 隐形成本巨大 微软点评Android六宗罪
- 【Effective Java】Ch1_简介
- 作图工具: XMind绘制思维导图简单入门
- struts2的json插件配置详解
- oracle 查看用户所在的表空间
- linux uml 免费 建模工具