开发者

Removing a pattern from text

I have a whole bunch of text. In between (random) there is something like 开发者_Go百科[7] or [23] (citation references). I just want to remove these references, where ever they occur and keep the text.

If if do something like [\\[0-9\\]] it takes each bracket separately and the number separately. How can I match the whole thing as one group and remove it from the whole text?

Thanks


The regex \\[[0-9]+\\] should work for your case (any number of digits between square brackets).


I think you have your backslashes in the wrong place, needs to be this and have a plus sign to allow for multi digit numbers

\\[[0-9]+\\]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜