开发者

What's a regex to replace "(11245)"

I need a regex fo开发者_JAVA百科r String.replaceAll(...) in Java to remove brackets and their contents.

For example:

 hello(100)

to:

 hello


Try this

theString.replaceAll("\\(.*?\\)", "")
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜