mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 12:36:16 -04:00
docs: Clarify regexp matcher capture group numbers (#28)
This commit is contained in:
parent
ff6a03e427
commit
cc329950b8
1 changed files with 2 additions and 2 deletions
|
@ -200,7 +200,7 @@ By request header fields.
|
|||
header_regexp [<name>] <field> <regexp>
|
||||
```
|
||||
|
||||
Like `header`, but supports regular expressions. Capture groups can be accessed via placeholder like `{http.regexp.name.capture_group}` where `name` is the name of the regular expression (optional, but recommended) and `capture_group` is either the name or number of the capture group in the expression.
|
||||
Like `header`, but supports regular expressions. Capture groups can be accessed via placeholder like `{http.regexp.name.capture_group}` where `name` is the name of the regular expression (optional, but recommended) and `capture_group` is either the name or number of the capture group in the expression. Capture group `0` is the full regexp match, `1` is the first capture group, `2` is the second capture group, and so on.
|
||||
|
||||
|
||||
### host
|
||||
|
@ -258,7 +258,7 @@ By request path, meaning the path component of the request's URI. Path matches a
|
|||
path_regexp [<name>] <regexp>
|
||||
```
|
||||
|
||||
Like `path`, but supports regular expressions. Capture groups can be accessed via placeholder like `{http.regexp.name.capture_group}` where `name` is the name of the regular expression (optional, but recommended) and `capture_group` is either the name or number of the capture group in the expression.
|
||||
Like `path`, but supports regular expressions. Capture groups can be accessed via placeholder like `{http.regexp.name.capture_group}` where `name` is the name of the regular expression (optional, but recommended) and `capture_group` is either the name or number of the capture group in the expression. Capture group `0` is the full regexp match, `1` is the first capture group, `2` is the second capture group, and so on.
|
||||
|
||||
|
||||
### protocol
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue