我想基本上捕捉到整个单词中包含至少3个大写字母的所有单词。
我想抓住的例子:
QUEUE_DRIVER=database
我的坏正则表达式: regexp_like(单词,' [AZ] {1,4}?+ [az] {1,16} + [AZ] {1,4}?+ [az] {1,16} + [AZ] { 1,4}'?)
答案 0 :(得分:2)
试试这个 - 它匹配单词应该匹配的位置......
WITH
words(word) AS (
SELECT 'noMatch'
UNION ALL SELECT 'onlYtwoNomatch'
UNION ALL SELECT 'thrEECapsmatch'
UNION ALL SELECT 'ThReeCapsmatch'
UNION ALL SELECT 'FourMatcHToo'
)
SELECT
*
FROM words
WHERE REGEXP_LIKE(word,'([A-Z]\w*){3}')
;