
CODE: [Copy to clipboard]cscript my.js 1.txt//var a=WScript.Arguments;if (a.Length > 0) WScript.Echo(a(0).match(/\w+@\w+\.\w+/));
var a=WScript.Arguments;
if (a.Length > 0){
var f=new ActiveXObject("Scripting.FileSystemObject");
var u=f.OpenTextFile(a(0).replace(/\\/g,"\\\\"),1).ReadAll().match(/\w+@\w+\.\w+/g);
//WScript.Echo(u);
for (i=0;i<u.length;i++)WScript.Echo(u[i]);
}
CODE: [Copy to clipboard]纯批的,不容错@echo off
for /f "delims=" %%a in (b.txt) do (
echo %%a|findstr "[a-z0-9]*@[a-z0-9]*\.[a-z0-9]*" >nul&&set/ac+=1&&call :replace "%%a" %%c%%
)
set new
pause
goto :eof
:replace
set x=0
set src=%~1
set tmp=%src:*@=%
call set src=%%src:%tmp%=%%
for %%i in (%src%) do set tmp=%%i%tmp%
for %%i in (%tmp%) do set/ax+=1,1/(1/x)2>nul&&echo %%i&&set dst=%%i
set newmail%~2=%dst%
goto :eof
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |