com.skillw.pouvoir.util.read.RegexUtil.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Pouvoir Show documentation
Show all versions of Pouvoir Show documentation
Bukkit Script Engine Plugin.
package com.skillw.pouvoir.util.read
import java.util.regex.Pattern
/**
* @className RegexUtil
*
* @author Glom
* @date 2023/8/8 20:22 Copyright 2024 Glom.
*/
val groupPattern = "\\(\\?<([a-zA-Z][a-zA-Z0-9]*)>".toRegex()
fun Pattern.groupNames(): Set = groupPattern.findAll(pattern()).map { it.groupValues[1] }.toSet()
© 2015 - 2024 Weber Informatics LLC | Privacy Policy