Matcher.replaceAll()
(즉 Matcher.replaceAll("$2")
).여러 역 참조()을 <strong>하나의</strong><a href="http://www.regular-expressions.info/java.html" rel="nofollow">backreference</a> 작품 중대한와
하지만 두 가지 이상의 역 참조로 작동하지 못했습니다. Matcher.replaceAll("$1$2")
.
Matcher.replaceAll()
은 여러 개의 하위 참조를 모두 지원합니까? 그렇다면, 그것을 사용하기위한 적절한 구문은 무엇입니까?
Matcher.replaceAll ("$ 1 $ 2") 작동합니다. 뭔가 잘못하고 있습니다. –
http://download.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html#replaceAll(java.lang.String) 이상한 점은 없습니다. 아마도 두 번째 역 참조가 비어있을 것입니까? – FailedDev