92. 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
解析:题目的意思是哪两个选项能和'[^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
因此可见答案是DE
转自:http://www.itpub.net/forum.php?mod=viewthread&tid=1327778
'[^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
解析:题目的意思是哪两个选项能和'[^Ale|ax.r$]'匹配
'[^Ale|ax.r$]'中^表示只匹配不在集合{'A','l','e','|','a','x','.','r','$'}中的字符, 此处的'|'、'.'、'$'只是表示普通的字符,而非匹配符
select regexp_instr('Alex','[^Ale|ax.r$]')
REGEXP_INSTR('ALEX','[^ALE|AX.R$]')
-----------------------------------
0
select regexp_instr('Alax','[^Ale|ax.r$]')
REGEXP_INSTR('ALAX','[^ALE|AX.R$]')
-----------------------------------
0
select regexp_instr('Alxer','[^Ale|ax.r$]')
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
因此可见答案是DE
转自:http://www.itpub.net/forum.php?mod=viewthread&tid=1327778