ocp 047-92 Evaluate the following expression using meta. character for regular expression:'[^Ale|ax
来源:互联网 发布:红牛为什么那么贵 知乎 编辑:程序博客网 时间:2024/05/29 07:02
Evaluate the following expression using meta. character for regular expression:
'[^Ale|ax.r$]'
Which two matches would be returned by this expression? (Choose two.)
A. Alex
B. Alax
C. Alxer
D. Alaxendar
E. Alexender
Answer: DE
Oracle正则表达式语法,正则表达式是在10g才添加进来的,其匹配字符、量词字符、匹配选项、相关函数如下:
匹配字符:
字符
功能
^
标记行的开始
$
标记行的结束
= =
匹配字符族,如:[=a=] 可匹配字符a、â、ã、ä、å等
.
匹配任何字符(除了NULL)
[:alnum:]
匹配任何字母和数字
[:alpha:]
匹配任何字母
[:blank:]
匹配空格
[:cntrl:]
匹配任何控制字符(在ASCII码表中不可打印的字符,如ESC键)
[:digit:]
任何数字
[:graph:]
任何 标点符号、大小写字母以及数字
[:lower:]
任何小写字母
[:print:]
任何可打印的字符
[:punct:]
任何标点符号,如,.+-=等
[:space:]
任何空白字符,如回车、换行、制表等
[:upper:]
任何大写字母
[:xdigit:]
任何十六进制数字,即0-9A-F
|
分隔符
()
子表达式,可作为量词或向后引用的前段
[char]
匹配括号中的任何字符,[^char]表示除开括号中字符后的任何字符
量词字符:
字符
功能
*
匹配0次或多次
?
匹配0次或1次
+
匹配1次或多次
{m}
匹配m次
{m,}
匹配至少m次
{m,n}
匹配至少m次,最多n次
\n
引用第n个匹配
匹配选项:
字符
功能
c
匹配时区分大小写
i
匹配时不区分大小写
m
源字符串为多行匹配
n
.可匹配任何换行符
函数:
REGEXP_LIKE 是LIKE语句的正则表达式版本
语法:REGEXP_LIKE(源字符串, 匹配表达式[,匹配选项])
REGEXP_INSTR 返回源字符串中首次匹配正则表达式的起始位置
语法:REGEXP_INSTR(srcstr, pattern [, position [, occurrence[, return_option [, match_option]]]])
srcstr:源字符串
pattern:正则表达式
position:搜索开始位置
occurrence:返回第几个匹配项
return_option:返回选项,0表示开始位置,1表示返回匹配的结束位置
match_option:匹配选项
REGEXP_SUBSTR 返回源串中匹配正则表达式的子字符串
语法:SUBSTR(srcstr, pattern [, position [, occurrence [, match_option]]])
srcstr:源字符串
pattern:正则表达式
position:搜索的开始位置
occurrence:返回第几个匹配的字符串
match_option:匹配选项
REGEXP_REPLACE 用执行字符串替换源文本中与正则表达式匹配的字符串
语法:REGEXP_REPLACE(srcstr, pattern [,replacestr [, position[, occurrence [, match_option]]]])
srcstr:源字符串
pattern:正则表达式
replacestr:新的字符串
position:搜索起始位置
occurrence:第几个匹配项
match_option:匹配选项
题目的意思是哪两个选项能和'[^Ale|ax.r$]'匹配
- ocp 047-92 Evaluate the following expression using meta. character for regular expression:'[^Ale|ax
- OCP-047 expression:'[^Ale|ax.r$]'
- Regular expression for VC
- Regular expression:The dot
- uva 11724 - Evaluate the Expression(expression)
- ocp 047-141 Evaluate the following SQL statement:SELECT product_name || 'it's not available for orde
- Unable to evaluate the expression. ???
- uva 11724 Evaluate the Expression
- regular expression for formating name
- regular expression
- Regular Expression
- regular expression
- Regular Expression
- Regular Expression
- regular expression
- Regular Expression
- Regular Expression
- regular expression
- 雁回山后山成为我最常去的地方
- gtk实现alt+f4功能
- 1016. Phone Bills (25)
- 2015 多校联赛 ——HDU5305(搜索)
- CF 559A(Gerald's Hexagon-几何割补法)
- ocp 047-92 Evaluate the following expression using meta. character for regular expression:'[^Ale|ax
- 关于Posix的消息队列
- 简单的i++ ++i实现
- 进程间通信-共享存储
- poj 2594 Treasure Exploration(最小路径覆盖/二分最大匹配)
- GCD,快速GCD,扩展GCD
- Git-Common-Usage
- Java初学习 - List与Map初始化的几种写法
- PLSQL访问网页简单案例(一)