fix regex quote issue, closes #84

Took 1 minute
This commit is contained in:
Kiran Hart 2024-01-23 14:48:58 -05:00
parent 5e603d7c79
commit cc5d8e934a
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3

View File

@ -333,7 +333,8 @@ public class AuctionAPI {
}
public boolean matchSearch(String pattern, String sentence) {
Pattern patt = Pattern.compile(ChatColor.stripColor(pattern), Pattern.CASE_INSENSITIVE);
String escapedPattern = Pattern.quote(ChatColor.stripColor(pattern));
Pattern patt = Pattern.compile(escapedPattern, Pattern.CASE_INSENSITIVE);
Matcher matcher = patt.matcher(sentence);
return matcher.find();
}