I want to add one blank space after any occurrence of:
<span class="negrita">ANYTHING</span>
So, with this SED instruction:
sed -E "s/(<span class=\"negrita\">.*?<\/span>)/\1 /g" <<< 'In <span class="negrita">1959</span> economic policy was reoriented in order to undertake <span class="negrita">the country modernization</span>. More text'
I get this output:
In <span class="negrita">1959</span> economic policy was reoriented in order to undertake <span class="negrita">the country modernization</span> . More text
So, as you can see, it is adding the blank space after the last occurrence, but not after the first one. Isn't the "/g" option meant to indicate that it should replace all occurrences?
Thanks in advance.