aav77%%
(?<str>([a-zA-Z0-9]))
{
"str": [
[
"a"
]
]
}
+ 匹配前导字符一次或多次
aav77%%
(?<str>([a-zA-Z0-9]+))
{
"str": [
[
"aav77"
]
]
}
下面是从官方文件中摘抄的最简单但是足够说明用法的示例:+
USERNAME [a-zA-Z0-9._-]+
USER %{USERNAME}
aav.%%_
(?<str>([a-zA-Z0-9._-]+))
{
"str": [
[
"aav."
]
]
}
aavssrr_%%_
(?<str>(%{USERNAME}))
{
"str": [
[
"aavssrr_"
]
]
}