The test code missed one line, for /f "delims=" %%a in ('dir "%~1\*.html" /b /a-d /on') do ( for /f "delims== tokens=2*" %%i in ('findstr /i /c:"var sourceRoot" "%~1\%%a"') do ( set sourceRoot=%%i set sourceRoot=!sourceRoot:~2,-2! set htmlName=%%a set htmlName2=!htmlName:~0,-5! ) >>"%~1.html" (findstr /i "D.p([" "%~1\!htmlName!" | sed.exe -r "1s#(D.p\(\[\x22)[^^*]+\*0#\1!htmlName2!\*0#gi" | sed.exe -r "s#(D.p\(\[\x22)!sourceRoot!#\1!htmlName2!\/#gi") )
Let's not care whether batch syntax parsing implements' string' type. Look at the parenthesis match in the first picture, the other end of the parenthesis is inside the double quotation marks, this is not reasonable, right?
String parsing and parenthesis matching issues in batch files
GDB x64(7.12 or later) hangs when the disassembly view is open
use_libportable
i have compiled and run the above source code using mingw (gcc 6.1.0) and got the...
about_portable_configuration_file
about_portable_configuration_file