With this code but without case sensitive. I want replace all word contain Esports, esports, eSports, ESports etc…
{{ $content := replace $content “Esports” “<a href="https://example.com/esports/\” >Esports" 1 }}
With this code but without case sensitive. I want replace all word contain Esports, esports, eSports, ESports etc…
{{ $content := replace $content “Esports” “<a href="https://example.com/esports/\” >Esports" 1 }}
You could try to combine that with lower
, for example
{{$content := replace (lower $content) "esports" "a href="..."> "Esports" 1}}
Ah… Simple as that “lowering whole content first” .
Thanks
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.