我需要 Java 中 String.replaceAll(...)
的正则表达式来删除括号及其内容。
例如:
hello(100)
至:
hello
最佳答案
试试这个
theString.replaceAll("\\(.*?\\)", "")
关于java - 什么是替换 "(11245)"的正则表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4969438/