|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
我就懒得装2009了
你是怎么替换的
I'm too lazy to install 2009. How did you replace it?
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2009-3-3 15:08 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
上传的QQ2009信息info.db文件 http://upload.cn-dos.net/img/1348.rar
例如有如下的乱码:
涳艛?忌:J垟麳]CF K-婣硵艛?忌:鉁s?殸⑽矎?
NF
515187266 9TD 傢ろ
04 435853964 -TD 傘18娿
?
5? o欙L( } ~搁搁块€8362-406
務蠚崄u39E拞r 515187266 >TD
ffffTA ?{-%/%//>PWf@=Oφ≌οη∠┫
要求:分行显示数字串。
1,由于QQ号码与乱码中的数字可能因为直接过滤其他字符而导致过滤后QQ号码与乱码中的数字连在一起而无法分辨,所以 个人认为应该使用替换。
2,因为乱码存在类似8362-406的数字串,所以在过滤时不能过滤掉-
3,由于该乱码中存在数字,所以少于5位的连续数字串要求被删除。
4,因为乱码存在类似8362-406的数字串,这些不是QQ号码,删除中间含有-的数字串。
5,删除重复的数字串
提取QQ号码后的示例效果如下:
435853964
515187266
Last edited by Hanyeguxing on 2009-3-4 at 01:16 ]
Uploaded QQ2009 information info.db file http://upload.cn-dos.net/img/1348.rar
For example, there are the following garbled codes:
涳艛?忌:J垟麳]CF K-婣硵艛?忌:鉁s?殸⑽矎?
NF
515187266 9TD 傢ろ
04 435853964 -TD 傘18娿
?
5? o欙L( } ~搁搁块€8362-406
務蠚崄u39E拞r 515187266 >TD
ffffTA ?{-%/%//>PWf@=Oφ≌οη∠┫
Requirement: Display digital strings in separate lines.
1. Since the QQ number and the numbers in the garbled code may be connected together due to directly filtering other characters, making it impossible to distinguish, I personally think that replacement should be used.
2. Because there are digital strings like 8362-406 in the garbled code, the - should not be filtered out during filtering.
3. Since there are numbers in this garbled code, the consecutive digital strings with less than 5 digits are required to be deleted.
4. Because there are digital strings like 8362-406 in the garbled code, which are not QQ numbers, delete the digital strings containing -.
5. Delete duplicate digital strings
Example effect after extracting the QQ number:
435853964
515187266
Last edited by Hanyeguxing on 2009-3-4 at 01:16 ]
|
|
2009-3-3 15:33 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
批处理文件名不能存成和命令一样的名字,不能存成COPY 和FR之类的
Batch file names cannot be the same as commands. They cannot be saved as COPY, FR, etc.
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2009-3-3 15:38 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
你就传一份文件上来吧
Just upload one file.
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2009-3-3 15:38 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
感谢楼上大大的热心
Thanks to the enthusiastic help of the upstairs big.
|
|
2009-3-3 18:55 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
还是先说明你这样做的目的吧
这样做究竟是为了什么
是为了把QQ号码提取出来,还是单纯就是要QQ号码之外的字符替换掉
Last edited by yishanju on 2009-3-4 at 00:17 ]
Still, let's first explain the purpose of what you're doing. What exactly is the reason for doing this? Is it to extract QQ numbers, or is it simply to replace characters other than QQ numbers
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2009-3-4 00:13 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 22 楼』:
Re 17楼
使用 LLM 解释/回答一下
很早之前就有10位QQ号了^_^
There were already 10-digit QQ numbers a long time ago ^_^
|

 |
|
2009-3-4 00:17 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
Originally posted by yishanju at 2009-3-4 00:13:
还是先说明你这样做的目的吧
这样做究竟是为了什么
是为了把QQ号码提取出来,还是单纯就是要QQ号码之外的字符替换掉
当然是为了把QQ号码提取出来。。。
我是这样做的:
1,首先,将文件备份,使用fr替换“-”与“0-9”之外的全部字符(因为乱码的数字中间有-,所以保留,例如801056-105)为Z。
2,然后将Z合并为空格
3,接着,以空格换行。但这个命令在运行中造成部分号码丢失及错误,不知道该怎么弄才好。
4,删除空行及空格,特殊字串
5,删除重复行
@echo off&setlocal enabledelayedexpansion
copy info.db isee1.txt>nul 2>nul
fr -ric:"" -t:"Z" ISee1.txt
for /f "delims=" %%i in (ISee1.txt) do (
set han=%%i
>>ISee2.txt echo !han!
)
del ISee1.txt
fr -f:"ZZ" -t:"Z" ISee2.txt
find ISee2.txt "ZZ" && GOTO CC||fr -f:"Z" -t:" " ISee2.txt
for /f "tokens=1*" %%n in (ISee2.txt) do (
set xing=%%n
>>ISee1.txt echo !xing!
>>ISee1.txt echo !xing!
)
del ISee2.txt
for /f "delims=" %%k in (ISee1.txt) do (
set ye=%%k
set "ye=!ye: =!"
set "ye=!ye:012345789=!"
set "ye=!ye:0123456789=!"
>>ISee2.txt echo=!ye!
)
del ISee1.txt
setlocal disabledelayedexpansion
for /f "delims=" %%l in (ISee2.txt) do (
if not defined %%l set %%l=A & echo %%l>>ISee1.txt
)
del ISee2.txt
。。。。。。
6,::删除带-的字串或行
::删除字串少于5位的行(乱码中的连续数字不会达到5位)
。。。。。。哎,没弄好呢
Last edited by Hanyeguxing on 2009-3-4 at 02:08 ]
Originally posted by yishanju at 2009-3-4 00:13:
Still, first explain the purpose of what you're doing
What exactly is the purpose of doing this
Is it to extract QQ numbers, or is it simply to replace characters other than QQ numbers
Of course, it's to extract QQ numbers...
This is what I did:
1. First, back up the file, use fr to replace all characters other than "-" and "0-9" with "Z" (because there are "-" in the messy numbers, so keep them, for example, 801056-105) as "Z".
2. Then merge "Z" into spaces
3. Then, split by spaces and newlines. But this command causes some numbers to be lost and errors during operation, and I don't know how to fix it.
4. Delete blank lines and spaces, special strings
5. Delete duplicate lines
@echo off&setlocal enabledelayedexpansion
copy info.db isee1.txt>nul 2>nul
fr -ric:"" -t:"Z" ISee1.txt
for /f "delims=" %%i in (ISee1.txt) do (
set han=%%i
>>ISee2.txt echo !han!
)
del ISee1.txt
fr -f:"ZZ" -t:"Z" ISee2.txt
find ISee2.txt "ZZ" && GOTO CC||fr -f:"Z" -t:" " ISee2.txt
for /f "tokens=1*" %%n in (ISee2.txt) do (
set xing=%%n
>>ISee1.txt echo !xing!
>>ISee1.txt echo !xing!
)
del ISee2.txt
for /f "delims=" %%k in (ISee1.txt) do (
set ye=%%k
set "ye=!ye: =!"
set "ye=!ye:012345789=!"
set "ye=!ye:0123456789=!"
>>ISee2.txt echo=!ye!
)
del ISee1.txt
setlocal disabledelayedexpansion
for /f "delims=" %%l in (ISee2.txt) do (
if not defined %%l set %%l=A & echo %%l>>ISee1.txt
)
del ISee2.txt
。。。。。。
6. ::Delete strings or lines with "-"
::Delete lines with fewer than 5 characters (continuous numbers in the mess will not reach 5 characters)
。。。。。。Hey, didn't get it right Last edited by Hanyeguxing on 2009-3-4 at 02:08 ]
|
|
2009-3-4 01:17 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
。。。。
这难度上了不是一个等级,我不会了
...
This is not at the same level in terms of difficulty, I don't know how to do it anymore
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2009-3-4 01:27 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
Originally posted by yishanju at 2009-3-4 01:27:
。。。。
这难度上了不是一个等级,我不会了
中途逃跑,是不厚道滴。。。。哈哈
Originally posted by yishanju at 2009-3-4 01:27:
。。。。
This is not just a level up in difficulty, I don't know how to do it anymore
Fleeing halfway is not kind... Haha
|
|
2009-3-4 02:00 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
   『第 26 楼』:
使用 LLM 解释/回答一下
@echo off
echo 处理中,请稍等几分钟...
sed "s//\n/g" Info.db>%temp%\a.txt
findstr ^*$ %temp%\a.txt>%temp%\b.txt
sort %temp%\b.txt>%temp%\c.txt
type nul>%temp%\d.txt
for /f "delims=" %%a in (%temp%\c.txt) do (
findstr /x /c:"%%a" %temp%\d.txt>nul 2>nul||echo.%%a>>%temp%\d.txt
)
start %temp%\d.txt
@echo off
echo Processing, please wait a few minutes...
sed "s//\n/g" Info.db>%temp%\a.txt
findstr ^*$ %temp%\a.txt>%temp%\b.txt
sort %temp%\b.txt>%temp%\c.txt
type nul>%temp%\d.txt
for /f "delims=" %%a in (%temp%\c.txt) do (
findstr /x /c:"%%a" %temp%\d.txt>nul 2>nul||echo.%%a>>%temp%\d.txt
)
start %temp%\d.txt
|

 |
|
2009-3-4 05:37 |
|
|
zqz0012005
中级用户
  
积分 297
发帖 135
注册 2006-10-21
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
//&@cls&cscript -nologo -e:javascript "%~f0">r.txt&start r.txt&exit/b
WScript.Echo( new ActiveXObject("Scripting.FileSystemObject").OpenTextFile("Info.db").ReadAll().match( /{6,10}/gim ).join("\n") );
//&@cls&cscript -nologo -e:javascript "%~f0">r.txt&start r.txt&exit/b
WScript.Echo( new ActiveXObject("Scripting.FileSystemObject").OpenTextFile("Info.db").ReadAll().match( /{6,10}/gim ).join("\n") );
|

hh.exe ntcmds.chm::/ntcmds.htm
 |
|
2009-3-4 21:55 |
|
|
ily2013
中级用户
  
积分 247
发帖 83
注册 2005-9-12
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
Originally posted by HAT at 2009-3-4 05:37:
@echo off
echo 处理中,请稍等几分钟...
sed "s//\n/g" Info.db>%temp%\a.txt
findstr ^*$ %temp%\a.txt>%temp%\b.txt
sort %temp%\b ...
本来想按这个思路回复的,细看原来您先回了
Originally posted by HAT at 2009-3-4 05:37:
@echo off
echo 处理中,请稍等几分钟...
sed "s//\n/g" Info.db>%temp%\a.txt
findstr ^*$ %temp%\a.txt>%temp%\b.txt
sort %temp%\b ...
Originally wanted to reply according to this idea, but on closer inspection, I originally replied first
|
|
2009-4-23 22:52 |
|
|
netbenton
银牌会员
     批处理编程迷
积分 1916
发帖 752
注册 2008-12-28 来自 广西
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
能否替换的时候,把所有非数字换为0a(换行符),可以的话,再加一个
for /f %%a in (...
就可以所有数字串提取出来了。
再判断%%a是否大于9999便知道是否为QQ号了
这样做速度会快很多。
Last edited by netbenton on 2009-4-23 at 22:55 ]
Can you replace all non-digits with 0a (newline character) when replacing? If possible, add a for /f %%a in (... and then all digit strings can be extracted. Then judge whether %%a is greater than 9999 to know whether it is a QQ number. This way, the speed will be much faster.
Last edited by netbenton on 2009-4-23 at 22:55 ]
|

精简
=> 个人 网志  |
|
2009-4-24 00:50 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
再判断%%a是否大于9999便知道是否为QQ号了
这思路秒啊
Then judge whether %%a is greater than 9999 to know whether it is a QQ number. This idea is brilliant!
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2009-4-24 03:08 |
|