diff --git a/src/main/java/ca/tweetzy/auctionhouse/api/AuctionAPI.java b/src/main/java/ca/tweetzy/auctionhouse/api/AuctionAPI.java index 5671c84..3f43dd9 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/api/AuctionAPI.java +++ b/src/main/java/ca/tweetzy/auctionhouse/api/AuctionAPI.java @@ -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(); }