wildcard matcher: quote replacement to prevent the matcher from replacing group references
This commit is contained in:
@@ -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))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user