Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 检测Oracle中双元音的正则表达式_Sql_Regex_Oracle - Fatal编程技术网

Sql 检测Oracle中双元音的正则表达式

Sql 检测Oracle中双元音的正则表达式,sql,regex,oracle,Sql,Regex,Oracle,有人能解释这个正则表达式吗?此查询在Oracle中用于返回带有双元音的员工的姓氏(其中姓氏包含两个相邻的a、e、i、o或u,不考虑大小写): 输出为: LAST_NAME --------------- De Haan Greenberg Khoo Gee Greene Lee Bloom Feeney 正则表达式模式([aeiou])\1只是连续匹配两个元音: ([aeiou]) match and capture a single vowel \1 then matc

有人能解释这个正则表达式吗?此查询在Oracle中用于返回带有双元音的员工的姓氏(其中姓氏包含两个相邻的a、e、i、o或u,不考虑大小写):

输出为:

LAST_NAME
---------------
De Haan
Greenberg
Khoo
Gee
Greene
Lee
Bloom
Feeney
正则表达式模式
([aeiou])\1
只是连续匹配两个元音:

([aeiou])   match and capture a single vowel
\1          then match the same vowel we just captured
如果你检查匹配的姓氏,你会发现他们在某些位置都有重复的元音。顺便说一下,术语
\1
称为反向参考,它指的是模式中较早捕获的数量

浏览下面有用的演示,以更好地了解模式的工作原理


你能更详细地解释一下这个表达式吗([aeiou])\1@AnkitJuneja看一下演示。我解释得再好不过了。看,解释在右边。好的,看1),2)
([aeiou])   match and capture a single vowel
\1          then match the same vowel we just captured