kokoxx 当前离线
上等兵
评分人数
qixiaobin0715 当前离线
大校
@echo off chcp 65001 set _".html"=0 set _".shtml"=0 for /f "delims=" %%i in (test.txt) do ( for %%j in (%%i) do ( if defined _"%%~xj" echo,%%~j ) ) pause复制代码
TOP
aloha20200628 当前在线
上尉
@echo off &setlocal enabledelayedexpansion chcp 65001>nul cd.>test.new for /f tokens^=6^delims^=^=^" %%v in (test.txt) do ( find "%%~v" test.new>nul || echo,%%v>>test.new ) type test.new复制代码
WHY 当前离线
上校
@echo off PowerShell "$s = (gc test.txt) -join ''; [regex]::Matches($s, 'https?://(?:(?!\x22|https?://).)+\.s?html(?=\x22)') | forEach {$_.Value} | sort -Unique | sc xxx.txt" pause复制代码
@echo off PowerShell "$s = (gc test.txt) -join ''; [regex]::Matches($s, 'https?://(?:(?!\x22|https?://).)+\.s?html(?=\x22)') | forEach {$_.Value + \"`r`n\"} | sort -Unique | sc xxx.txt" echo;Done pause > nul复制代码