正则表达式不会返回所有匹配的值

时间:2020-04-20 04:08:19

标签: regex

我有一个字符串:

Lorem ipsum.  aws_oracle_ext.get_package_variable('THIS','IS','A');
Lorem ipsum....
aws_oracle_ext.get_package_variable
('THIS','IS','B')    Lorem ipsum....  aws_oracle_ext.get_package_variable('THIS'
   ,'IS','C')    Lorem ipsum....  aws_oracle_ext.get_package_variable
    ('THAT'
     ,'IS',
     'D');
Lorem ipsum....

我想grep所有字符串aws_oracle_ext.get_package_variable('THIS','IS'

我尝试过正则表达式

aws_oracle_ext.get_package_variable[^\)]*\('THIS'[,]'IS'

我可以接电话

aws_oracle_ext.get_package_variable('THIS','IS','A')
aws_oracle_ext.get_package_variable('THIS','IS','B')

但无法获得

aws_oracle_ext.get_package_variable('THIS','IS','C')

也尝试了单行模式,但没有用 您可以更正我的正则表达式吗? https://regexr.com/52rnh 谢谢!

0 个答案:

没有答案