aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-09-12 08:57:22 +0200
committerGitHub <noreply@github.com>2024-09-12 08:57:22 +0200
commit996b70464766ca017de65b85b0574b0ed6eccab4 (patch)
tree212613973e517d1017ff10c834c6b299641e0be7 /src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt
parente350ade0d86955ce1a865f4286cd208d54693777 (diff)
downloadskyhanni-996b70464766ca017de65b85b0574b0ed6eccab4.tar.gz
skyhanni-996b70464766ca017de65b85b0574b0ed6eccab4.tar.bz2
skyhanni-996b70464766ca017de65b85b0574b0ed6eccab4.zip
Fix: Duplex (#2501)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt b/src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt
index 8bb09e6fc..9ce7a32c5 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/UtilsPatterns.kt
@@ -49,6 +49,16 @@ object UtilsPatterns {
"^(?<format>(?:§.)*)(?<name>[^§]+) (?<level>[IVXL]+)(?: Book)?$"
)
+ /**
+ * REGEX-TEST: duplex i
+ * REGEX-TEST: ultimate wise v
+ * REGEX-TEST: chimera 2
+ */
+ val cleanEnchantedNamePattern by patternGroup.pattern(
+ "item.enchantment.clean.name",
+ "(?i)(?<name>.*) (?<level>[IVXL]+|[0-9]+)"
+ )
+
val potionPattern by patternGroup.pattern(
"item.name.potion",
".*Potion"