MatcherValue

interface MatcherValue

匹配器动态参数. 动态参数的规则为 {{name[,regex]}}, 或者原生的正则分组 (?<name>regex)

Author

forte

Functions

Link copied to clipboard
abstract fun getParam(name: String, text: String): String?

根据变量名称获取一个动态参数。 此文本需要符合正则表达式。

Link copied to clipboard
abstract fun getParameters(text: String?): MatchParameters

从一段匹配的文本中提取出需要的参数。

Link copied to clipboard
abstract fun matches(text: String): Boolean

是否匹配. 使用的完全正则匹配: regex.matches(text)

Properties

Link copied to clipboard
abstract val original: String

获取原始字符串

Link copied to clipboard
abstract val regex: Regex

获取用于匹配的正则

Inheritors

Link copied to clipboard
Link copied to clipboard