diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-05-06 16:44:32 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-05-06 16:44:32 +0200 |
commit | a4a002f9b8d4267980c4f9b3f3852266f095fd16 (patch) | |
tree | 8effdd1eb14766f45a5e209afcc88110d373fd2d /src/main/java/at | |
parent | 22d8bdc6cdd99b7185166fc51052dbb65a6ed020 (diff) | |
download | skyhanni-a4a002f9b8d4267980c4f9b3f3852266f095fd16.tar.gz skyhanni-a4a002f9b8d4267980c4f9b3f3852266f095fd16.tar.bz2 skyhanni-a4a002f9b8d4267980c4f9b3f3852266f095fd16.zip |
added regex tests
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListReader.kt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListReader.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListReader.kt index 68b65fcc0..1e1f2fd76 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListReader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListReader.kt @@ -24,14 +24,23 @@ object TabListReader { "username", "^\\[(?<sblevel>\\d+)] (?:\\[\\w+] )?(?<username>\\w+)" ) + /** + * REGEX-TEST: §r§r§7You have a §r§cGod Potion §r§7active! §r§d12 Hours§r + */ private val godPotPattern by patternGroup.pattern( "effects.godpot", - "You have a God Potion active! (?<timer>[\\w ]+)" + "§r§r§7You have a §r§cGod Potion §r§7active! §r§d(?<timer>[\\w ]+)§r" ) + /** + * REGEX-TEST: §r§r§a§lActive Effects§r + */ private val activeEffectPattern by patternGroup.pattern( "effects.active", "Active Effects(?:§.)*(?:\\n(?:§.)*§7.+)*" ) + /** + * REGEX-TEST: §r§r§7§r§7You have §r§e1 §r§7active effect. Use "§r§6/effects§r§7" to see it!§r + */ private val effectCountPattern by patternGroup.pattern( "effects.count", "You have (?:§.)*(?<effectCount>[0-9]+) (?:§.)*active effect" |