Hi folks!
A small question on replaceRE way of working:
Here is my code:
{{ $test1 := "yo man" }}
{{ $test1 := replaceRE ".* (.*)" "$1" $test1 }}
{{ $test1 }}
{{ $test2 := replaceRE "<p><img src=\"([^\"]+)\" alt=\"([^\"]+)\" ?/?></p>" "[$1]" .Content }} {{ $test2 }}
Here is the output:
man
<h2 id="quidque-corpore">Quidque corpore</h2>
[/vincent.jpg]
<p>Lorem markdownum verbis. Ipso et felices curvos, interit fulmina avellere sed
utendum alte, illas; <em>sumusve huc</em> corpora. Formam cupit, imagine cur tulerunt
So first match and replace is good to me! But the second one is not!
My purpose is to only output image path+name from : <img src="/vincent.jpg" alt="coucou" />
and then have /vincent.jpg in $test2 … But instead I got .Content altered…
Do I miss something?