wildcard matcher: quote replacement to prevent the matcher from replacing group references

This commit is contained in:
Adam
2020-11-09 11:54:14 -05:00
parent 51d105a30b
commit 811842ef2f
2 changed files with 2 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ public class WildcardMatcher
}
else
{
matcher.appendReplacement(buffer, "\\\\Q" + matcher.group(0) + "\\\\E");
matcher.appendReplacement(buffer, Matcher.quoteReplacement(Pattern.quote(matcher.group(0))));
}
}