[英]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.