我想更換的Java String.replaceAll正則表達式
網/風格/ clients.html
與Java String.replaceFirst方法的第一個方面,所以我可以得到:
$ {} pageContext.request.contextPath /style/clients.html
我試圖
String test = "web/style/clients.html".replaceFirst("^.*?/", "hello/");
這給我:
你好/風格/ clients.html
但是當我做
String test = "web/style/clients.html".replaceFirst("^.*?/", "${pageContext.request.contextPath}/");
給我
java.lang.IllegalArgumentException:非法羣組引用