< !--You are a good boy -->
This is my second line
<! --I am a good boy
He is hero-->
This is a fine
< !--This line contains xml tags
This can be a html line or xml line
-->
Done
在批处理文件输出中应用regexp逻辑后应
This is my second line
This is a fine
Done
请注意
---- < !--
启动html或xml注释-->
代表html或xml注释的结尾
答案 0 :(得分:0)
你的例子有点做作,但这可以解决你不想要的行,包括html或xml这一行。
findstr /v "< >" "file.xml"
它给出了这个输出:并且将使用标记代码删除html行。
This is my second line
This is a fine
This can be a html line or xml line
Done