我想从字符串中删除$ {anything}或$ {somethingelse},但我找不到正则表达式.
我的实际代码
String url = http://test.com/index.jsp?profil=all&value=${value}
String regex = "\\$\\{*\\}";
url = url .replaceAll(regex, ""); // expect http://test.com/index.jsp?profil=all&value=
//but it is http://test.com/index.jsp?profil=all&value=${value}
Run Code Online (Sandbox Code Playgroud)
我确定解决方案是愚蠢的,但无法找到.
| 归档时间: |
|
| 查看次数: |
238 次 |
| 最近记录: |