Code: Select all
<span></span>.
would be replaced by
Code: Select all
.<span>
Edit:
I found better to completely remove
Code: Select all
<span></span>
Moderator: DosItHelp
Code: Select all
<span></span>.
Code: Select all
.<span>
Code: Select all
<span></span>
Code: Select all
<span></span>.
<span></span>.
<span></span>.
Code: Select all
@echo off & setlocal enabledelayedexpansion
::
:: remember the "^" before each ">", "<"
:: replaces "<span> </ span>" -> ".<span>"
::
set file=file.txt
::
for /f "tokens=*" %%t in (%file%) do (
set S=%%t
set S=!S:^<span^>^</span^>.=.^<span^>!
>>$tmp$ echo !S!
)
del %file%
ren $tmp$ %file%
pause>nul
Code: Select all
FOR /f "tokens=*" %%t in (%1) do (
SET S=%%t
if defined S (
SET S=!S:^<span^>^</span^>=!
>>$tmp$ echo !S!
)
)