[英]A regex to detect a word and a string that is not enclosed in double quotes
我试图为示例代码编写一个正则表达式,以在 grep 搜索中使用。
我的要求是获得仅与以下匹配的字符串输出
执行(这里的任何词)
例如。
execute(any)
execute(math)
结果不应该输出
execute("any")
execute("math")
我已经尝试了以下方法,但问题在于它输出了所有内容并且没有给我所需的解决方案。
grep -E '^execute\(*([^)]+)*\)'
我希望我的输出是 execute(math) 或 execute(s) 而不是
执行(“数学”)或执行(“s”)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.