Update Regex to \b(\d*)[dD](\d+)\b

This commit is contained in:
2023-02-02 17:40:35 +08:00
committed by GitHub
parent f631218c0c
commit 0975e7e49c

View File

@@ -17,7 +17,7 @@ object JDice : KotlinPlugin(
author("jie65535") author("jie65535")
} }
) { ) {
private val regex = Regex("""(\d*)[dD](\d+)""") private val regex = Regex("""\b(\d*)[dD](\d+)\b""")
private val random = Random(System.currentTimeMillis()) private val random = Random(System.currentTimeMillis())
override fun onEnable() { override fun onEnable() {
@@ -36,4 +36,4 @@ object JDice : KotlinPlugin(
logger.info { "Plugin loaded. https://github.com/jie65535/JDice" } logger.info { "Plugin loaded. https://github.com/jie65535/JDice" }
} }
} }