回复 3# momoliang - @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- set "input=1.txt"
- set "output=2.txt"
- powershell -NoProfile -ExecutionPolicy bypass ^
- $text=[IO.File]::ReadAllText('%input%', [Text.Encoding]::Default);^
- $m=[regex]::matches($text,'add\(''msrmc'',''([^^'']*?)''^|add\(''zh'',''([^^'']*?)''^|add\(''msrdh'',''([^^'']*?)''');^
- [System.Collections.ArrayList]$s=@();^
- foreach($item in $m){^
- [void]$s.add($item.groups[0].value.split(',')[1].trim(''''));^
- };^
- [IO.File]::WriteAllLines('%output%', $s, [Text.Encoding]::Default);
- echo;%info%
- pause
复制代码
|