Formula replaceRE HTML tag in HUGO

How to use the Replace GOHUGO replaceRE Function for HTML A tags.

Some Example

{{ $content := replace .Content "Jhon Doe" "Sutaryono" }}

{{ $content = replaceRE $content "<a href=\"http://example:1313/dynamic-link">Some Text</a>" "<span>Some Text</span>" }}

{{ $content | safeHTML }}

:see_no_evil:

:hear_no_evil:

Anybody want to share the REGEX formula for this case

Thanks :laughing: :laughing: :grin:

Hi there,

Regex in general is not specific to Hugo, and as such is outside the scope of this forum. This page in the docs has some links about regex you might find useful.