mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-25 07:48:52 +00:00
1001 B
1001 B
title, linktitle, description, godocref, date, publishdate, lastmod, categories, tags, ns, signature, workson, hugoversion, relatedfuncs, deprecated, aliases
| title | linktitle | description | godocref | date | publishdate | lastmod | categories | tags | ns | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| replacere | replaceRE | Replaces all occurrences of a regular expression with the replacement pattern. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
|
false |
Replaces all occurrences of a regular expression with the replacement pattern.
{{ replaceRE "^https?://([^/]+).*" "$1" "http://gohugo.io/docs" }}` → "gohugo.io"
{{ "http://gohugo.io/docs" | replaceRE "^https?://([^/]+).*" "$1" }}` → "gohugo.io"
{{% note %}} Hugo uses Golang's Regular Expression package, which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the GitHub wiki for re2. {{% /note %}}