我有一些这样的文字:
Sentence #1 (n tokens):
Blah Blah Blah
[...
...
...]
( #start first set here
... (other possible parens and text here)
) #end first set here
(...)
(...)
Sentence #2 (n tokens):
Run Code Online (Sandbox Code Playgroud)
我想提取第二组括号(包括中间的所有内容),即,
(
... (other possible parens here)
)
Run Code Online (Sandbox Code Playgroud)
有没有一种 bash 方法来做到这一点。我尝试了简单的
's/(\(.*\))/\1/'
Run Code Online (Sandbox Code Playgroud)