宝宝抱抱贝贝 当前离线
列兵
hfxiang 当前离线
上尉
TOP
gawk -F"=+" "/DzAPI_Map_HasMallItem\(/{for(i=1;i<=NF;i++)if(match($i,/^.*DzAPI_Map_HasMallItem\([^\042]+\"(.+)\"\).*$/,arr))if(!x[arr[1]]++)print arr[1]}" war3map.j>out.txt复制代码
gawk -F"=+" "/DzAPI_Map_HasMallItem/{for(i=1;i<=NF;i++)if(match($i,/^.*DzAPI_Map_HasMallItem\([^\(]+\([^\(]+\),\"(....)\"\).*$/,arr))if(!x[arr[1]]++)print arr[1]}" 1.txt>2.txt复制代码
qixiaobin0715 当前离线
大校
@echo off setlocal enabledelayedexpansion (for /f "delims=" %%i in (1.txt) do ( set "str=%%i" set "str=!str:(= !" set "str=!str:)= !" for %%j in (!str!) do ( if "%%j"=="DzAPI_Map_HasMallItem" ( set n=0 ) else if defined n ( set /a n+=1 if !n! equ 3 ( set n= if not defined _%%~j ( echo,%%~j set _%%~j=true ) ) ) ) ))>2.txt pause复制代码
pd1 当前离线
五级士官
<# : @echo off powershell -NoProfile -ExecutionPolicy bypass "Get-Content -literal '%~f0' |Out-String|Invoke-Expression" pause #> $a=get-content 1.txt $regex = [regex]"`"([A-Z]{4})`"" $regex.Matches($a)|%{$_.Groups[1].Value}|Select-Object -Unique|Out-File -Append -FilePath 2.txt复制代码
jyswjjgdwtdtj 当前离线
中尉
set fso=createobject("scripting.filesystemobject") set f=fso.opentextfile("1.txt",1,false,0)'这里! a=f.readall set f=fso.createtextfile("2.txt",true) set re=new regexp re.global=true re.pattern="DzAPI_Map_HasMallItem\(.*?,""(.*?)""\)" for each i in re.execute(a) f.writeline i.submatches(0) next复制代码
77七 当前离线
中校
@echo off (for /f tokens^=2^,4delims^=^" %%a in ('type "1.txt" ^|find "DzAPI_Map_HasMallItem"') do ( if not defined _"%%a" ( echo %%a set _"%%a"=1 ) if "%%b" neq "" if not defined _"%%b" ( echo %%b set _"%%b"=1 ) ))>2.txt复制代码