随风 当前离线
荣誉版主
varvar:&rdquo r:“hjf abc"i复制代码
@echo off for /f "delims=" %%a in (a.txt) do ( set "var=%%a" setlocal enabledelayedexpansion set "var=!var:"=!" set "var=!var:&rdquo=!"&set "var=!var:&ldquo=!" echo !var! ) pause复制代码
CrLf 当前离线
论坛巡查
TOP
batman 当前离线
考官
601997526 当前离线
六级士官
set var=!var:^"=!&set "var=!var:&rdquo=!"&set "var=!var:&ldquo=!"复制代码
plp626 当前离线
贵宾
@echo off for /f "delims=" %%a in (a.txt) do ( set "var=%%a" setlocal enabledelayedexpansion set "var=!var:"=!" set "var=!var:&rdquo=!"&set "var=!var:&ldquo=!" echo !var! endlocal ) pause @echo off&set lf=^ for /f "delims=" %%a in (a.txt) do ( set "var=%%a" setlocal enabledelayedexpansion %换行符法% set "var=!var:"=!"%lf%set "var=!var:&rdquo=!"&set "var=!var:&ldquo=!" echo !var! endlocal ) pause for /f "delims=" %%a in (a.txt) do ( set "var=%%a" setlocal enabledelayedexpansion %首引号转义法% set ^"var=!var:"=!"&set "var=!var:&rdquo=!"&set "var=!var:&ldquo=!" echo !var! endlocal ) pause set "quot="" for /f "delims=" %%a in (a.txt) do ( set "var=%%a" setlocal enabledelayedexpansion for %%q in (!quot!)do ( %for变量法% set "var=!var:%%q=!"&set "var=!var:&rdquo=!"&set "var=!var:&ldquo=!" ) echo !var! endlocal ) pause复制代码
评分人数