Hi
In a template I’m trying to display images which are named this way :
<city>_<number between 01 and 99>_<R or V>.<extension
Here is my code :
{{ $files := .Resources.ByType "image" }}
{{ range $files }}
{{ $toto := findRE `(.+)_(\d\d)_(.)\.(.+)` .Name }}
{{ .Name}}@{{ index $toto 0 }}@{{ index $toto 1 }}@{{ index $toto 2 }}@{{ index $toto 3 }}@{{ index $toto 4 }}@<br>
{{ end }}
With the file Anvers_01_R.jpg it displays :
Anvers_01_R.jpg@Anvers_01_R.jpg@@@@@
Instead I was waiting for
Anvers_01_R.jpg@Anvers_01_R.jpg@Anvers@01@R@jpg@
What is wrong ?
Thanks in advance
Welsh