Fix creating delimiter patterns

This commit is contained in:
Luck 2017-02-26 21:28:40 +00:00
parent fd4963c74b
commit 2862f0dfae
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -55,7 +55,8 @@ public class Patterns {
.build(new CacheLoader<Map.Entry<String, String>, String>() {
@Override
public String load(Map.Entry<String, String> e) {
return "(?<!" + Pattern.quote(e.getKey()) + ")" + Pattern.quote(e.getValue());
// note the reversed order
return "(?<!" + Pattern.quote(e.getValue()) + ")" + Pattern.quote(e.getKey());
}
});