```nginx server { listen 80; server_name ~^(?<sub>.+).example.com$; location / { proxy_pass http://${sub}.google.com; } } ``` 对于 `${sub}` 形式的变量,不论是格式化还是高亮都支持的不太好,尤其是格式化,会出错。 如果放入引号中 `"http://${sub}.google.com"` 会无法格式化