I have a number of files that I want to replace the date in and I don’t want any white space in the new date.
Here is an example
The code before could be :
<span class=“new”>2000-12-31</span>
<span class=“date”> 2010-11-11</span>
…
My search string is the following (and it works well)
(<span class=“[\w]+”>)([\s][0-9]{4}-[0-9]{2}-[0-9]{2})[\s])(</span>)
I’d like to replace it with
<span class=“[value]”>2011-02-12</span>
so I’d like to be able to use the replace string
$12011-02-12$3
but that gives me
$12011-02-12</span>
does anyone no of a way of achieving the result I’m looking for?
I can do it in 2 steps by using
$1 2011-02-12$3
but then I have to do another search to get rid of the spaces.