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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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" }
} }
} }