ORACLE正则 博客分类: oracle正则 oracle正则
程序员文章站
2024-03-01 11:29:52
...
oracle中使用正则匹配一列都是数字,或不是数字
NOT REGEXP_LIKE(description,'[[:digit]]'): Matching for a non-digit
oracle offial Examples
Character Class Syntax Meaning
NOT REGEXP_LIKE(description,'[[:digit]]'): Matching for a non-digit
SELECT * FROM dual WHERE regexp_like('1234', '^[[:digit:]]+$');
SELECT * FROM dual WHERE not regexp_like('1234', '^[[:digit:]]+$');
oracle offial Examples
The following query returns the first and last names for those employees with a first name of Steven or Stephen (where first_name begins with Ste and ends with en and in between is either v or ph): SELECT first_name, last_name FROM employees WHERE REGEXP_LIKE (first_name, '^Ste(v|ph)en$'); FIRST_NAME LAST_NAME -------------------- ------------------------- Steven King Steven Markle Stephen Stiles The following query returns the last name for those employees with a double vowel(元音字母) in their last name (where last_name contains two adjacent occurrences of either a, e, i, o, or u, regardless of case): SELECT last_name FROM employees WHERE REGEXP_LIKE (last_name, '([aeiou])\1', 'i'); LAST_NAME ------------------------- De Haan Greenberg Khoo Gee Greene Lee Bloom Feeney
Character Class Syntax Meaning
[:alnum:] All alphanumeric characters [:alpha:] All alphabetic characters [:blank:] All blank space characters. [:cntrl:] All control characters (nonprinting) [:digit:] All numeric digits [:graph:] All [:punct:], [:upper:], [:lower:], and [:digit:] characters. [:lower:] All lowercase alphabetic characters [:print:] All printable characters [:punct:] All punctuation characters [:space:] All space characters (nonprinting) [:upper:] All uppercase alphabetic characters [:xdigit:] All valid hexadecimal characters
推荐阅读
-
ORACLE正则 博客分类: oracle正则 oracle正则
-
列出两个日期间的所有日期(使用oracle的rownum实现在sql中使用循环) 博客分类: SQL SQLOracleBlackBerry黑莓
-
oarcle使用ipc协议配置方法 博客分类: 数据库oracle
-
列出两个日期间的所有日期(使用oracle的rownum实现在sql中使用循环) 博客分类: SQL SQLOracleBlackBerry黑莓
-
oracle中怎样查询数据表的哪个字段是主键 博客分类: oracle Oracle
-
如果查询表employee中的字段名和字段的数据类型,还有约束条件。 博客分类: oracle SQL
-
Oracle_IO_性能调优手册.rar 博客分类: oracle Oracle
-
oracle中怎样查询数据表的哪个字段是主键 博客分类: oracle Oracle
-
php里常用正则表达式总结 博客分类: php 正则
-
基于Oracle 分布式数据库的查询优化 下载 博客分类: 基于Oracle 分布式数据库的查询优化 基于Oracle 分布式数据库的查询优化 下载