我想从tetxt中删除以数字结尾的括号。所以我使用这个regex:\(.+?(\d+)\)
这个regex删除了类似于(1980年)或(第100页)的案文,但它也将删除以下整个短语:
(etc) and new frontiers in Social Neuroscience (pp. 127-151)哪个正则表达式将忽略上面的第一个括号?
发布于 2015-12-10 05:28:54
\([^)]*\d+\)您需要使用this.Your regex在(etc) and new frontiers in Social Neuroscience (pp. 127-151)上失败,因为它说查找一个(,然后找到第一个\d,这里是127和find )。
https://stackoverflow.com/questions/34194271
复制相似问题