正则表达式错误 \(.+?(\d+)\)

error with regex \(.+?(\d+)\)

我想从文本中删除任何以数字结尾的括号。所以我使用这个正则表达式:\(.+?(\d+)\)

这个正则表达式删除了像 (1980) 或 (pp. 100) 这样的文本,但它也会删除下面的整个短语:

(etc) and new frontiers in Social Neuroscience (pp. 127-151)

哪个正则表达式会忽略上面的第一个括号?

\([^)]*\d+\)

您需要使用 this.Your 正则表达式在 (etc) and new frontiers in Social Neuroscience (pp. 127-151) 上失败,因为它说找到 ( 然后找到第一个 \d,即 127,然后找到 ).