|
tobisome
中级用户
  
积分 220
发帖 38
注册 2004-8-12
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
双感叹号与双%号的区别是什么呢
for的do里面好像看到的是!n!
其他的像echo看到的是%n%
这个可以讲讲吗
What is the difference between double exclamation marks and double percent signs?
I seem to see!n! in the do of for
Others like echo see %n%
Can you talk about this?
|
|
2007-10-19 19:46 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
|
2007-10-19 19:47 |
|
|
handan
初级用户
 
积分 30
发帖 12
注册 2007-10-19
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
tokens=1* 这个是什么意思 我没看懂
tokens=1* What does this mean? I don't understand.
|
|
2007-10-19 20:56 |
|
|
moniuming
银牌会员
     永远的菜鸟
积分 1335
发帖 574
注册 2007-11-27 来自 广西
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
还是版主高明啊,佩服
Still, the moderator is really brilliant, I admire it
|
|
2008-1-25 00:38 |
|
|
komafd2
初级用户
 
积分 53
发帖 20
注册 2007-6-8
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
自己试了一下,把word当成分隔符
@ echo off
set "a=333ps555psssword=123 456 789"
for /f "tokens=1* delims=word" %%i in ("%a%") do set b=%%i&set num=%%j
echo %b:~0,-4% %num%
pause
Tried it myself, using word as a delimiter
@ echo off
set "a=333ps555psssword=123 456 789"
for /f "tokens=1* delims=word" %%i in ("%a%") do set b=%%i&set num=%%j
echo %b:~0,-4% %num%
pause
|
|
2008-2-22 16:15 |
|
|
nanhui112
初级用户
 
积分 127
发帖 59
注册 2007-11-13
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
这个问题值得研究研究...就是当 delims=字符串时 以什么样的方式分割.
This question is worth studying... That is, when delims = string, in what way it is split.
|
|
2008-3-7 21:52 |
|
|
lovelymorning
初级用户
 
积分 131
发帖 72
注册 2008-2-24
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
善用变量,多用 偷梁换柱
Make good use of variables, use more "substitution"
|
|
2008-3-8 14:24 |
|
|
huahua0919
银牌会员
    
积分 1608
发帖 780
注册 2007-10-7
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
delims=字符串时 举例:
如果字符串是abc
则起到分割作用的分割符有
a,b,c,ab,ac,bc,abc
学过排列组合的就知道不管字符的长度为多少,分割符总是为:
Cn1+Cn(n-1)..........Cnn,就有这么多的可能!
When delims= is a string: For example: If the string is abc, then the delimiters that play a splitting role are a, b, c, ab, ac, bc, abc. Those who have studied permutations and combinations will know that no matter the length of the character, the number of possible delimiters is always: Cn1 + Cn(n-1) +... + Cnn, there are so many possibilities!
|
|
2008-3-8 15:01 |
|
|
nanhui112
初级用户
 
积分 127
发帖 59
注册 2007-11-13
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
只能主观这么认为 我的意思是字符串在被分割的字符串中有什么特点时 已什么样的方式分割
我也是实验知道的 列如若delims=中的字符串具有唯一性时 会以第整串字母作为分割符 否则 会以第一个字符作为分割符 不够准确 望大虾指出!
Can only be subjectively considered. I mean, what are the characteristics of the string when it is being split, and in what way is it split? I also know from experiments. For example, if the string in delims= has uniqueness, it will use the entire string of letters as the delimiter; otherwise, it will use the first character as the delimiter. It's not accurate enough. Hope the experts can point out!
|
|
2008-3-8 22:56 |
|
|
bjsh
银牌会员
    
积分 2000
发帖 621
注册 2007-1-1
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
Originally posted by nanhui112 at 2008-3-8 10:56 PM:
只能主观这么认为 我的意思是字符串在被分割的字符串中有什么特点时 已什么样的方式分割
我也是实验知道的 列如若delims=中的字符串具有唯一性时 ...
"delims=abcedef"
无论 那种情况 delims 的分割 是以 等号 后的每一个字符作为分隔符的
只是在 所谓的 "唯一性" 时 看起来 像 以整个字符串为分隔符而已
Originally posted by nanhui112 at 2008-3-8 10:56 PM:
Can only be subjectively considered this way. I mean, what characteristics the string has when it is being split, and in what way it is split.
I also know from experiments. For example, if the characters in delims= have uniqueness...
"delims=abcedef"
No matter what the situation is, the splitting of delims is using each character after the equal sign as the delimiter.
It just seems to use the entire string as the delimiter when it is said to be "unique".
|
|
2008-3-9 15:41 |
|
|
wjmm
初级用户
 
积分 48
发帖 19
注册 2008-4-16
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
经测试,还可以用一个汉字作分隔符,
我的理解,分隔符是 一个字节
Originally posted by 26933062 at 2007-5-26 12:10 AM:
哦.原来这样,就是说只能以一个单一的字母或符号作分隔符 是吗?
Last edited by 26933062 on 2007-8-11 at 05:59 AM ]
After testing, it can also use a single Chinese character as a separator.
My understanding is that the separator is one byte
Originally posted by 26933062 at 2007-5-26 12:10 AM:
Oh. So that's the case. Does that mean it can only use a single letter or symbol as a separator?
Last edited by 26933062 on 2007-8-11 at 05:59 AM ]
|
|
2008-7-1 10:03 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
Originally posted by wjmm at 2008-7-1 10:03:
经测试,还可以用一个汉字作分隔符,
我的理解,分隔符是一个字节
正如 3 楼说的,只能以一个单一的字母或符号作分隔符,而不是一个字节(一个汉字是两个字节)
Originally posted by wjmm at 2008-7-1 10:03:
After testing, it can also use a Chinese character as a separator,
My understanding is that the separator is one byte
As the 3rd floor said, it can only use a single letter or symbol as a separator, not a byte (one Chinese character is two bytes)
|

 |
|
2008-7-2 08:55 |
|
|
wjmm
初级用户
 
积分 48
发帖 19
注册 2008-4-16
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
经测试,分隔符可以是一个汉字
比如,有一文本文件test.txt,其内容如下
-------------------------------------------------------------------------------
111111你2222222你3333333333你4444444
55555你66666你7777777777777777777你88888
9999你00000你aaaaaaaa你bbbbbb
---------------------------------------------------------------------------------
批处理代码
@echo off
FOR /F "tokens=1,3,4 delims=你" %%a in (test.txt) do @echo %%a %%b %%c
pause
执行该批处理后,可以发现汉字“你”确实可以作为分隔符
字节"
Originally posted by zh159 at 2008-7-2 08:55 AM:
正如 3 楼说的,只能以一个单一的字母或符号作分隔符,而不是一个字节(一个汉字是两个字节)
Last edited by wjmm on 2008-7-3 at 11:30 AM ]
After testing, the delimiter can be a Chinese character
For example, there is a text file test.txt, and its content is as follows
-------------------------------------------------------------------------------
111111You2222222You3333333333You4444444
55555You66666You7777777777777777777You88888
9999You00000YouaaaaaaaaYoubbbbbb
---------------------------------------------------------------------------------
Batch processing code
@echo off
FOR /F "tokens=1,3,4 delims=You" %%a in (test.txt) do @echo %%a %%b %%c
pause
After executing this batch processing, it can be found that the Chinese character "You" can indeed be used as a delimiter
Byte"
Originally posted by zh159 at 2008-7-2 08:55 AM:
As the 3rd floor said, it can only be a single letter or symbol as a delimiter, not a byte (a Chinese character is two bytes)
Last edited by wjmm on 2008-7-3 at 11:30 AM ]
|
|
2008-7-2 15:16 |
|
|
zzybq
初级用户
 
积分 36
发帖 22
注册 2009-9-12 来自 厦门
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
确实很好,学习了
It's really good, I've learned something.
|
|
2009-10-29 12:16 |
|
|
Evangel
初级用户
 
积分 145
发帖 95
注册 2008-4-12
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
楼上的兄弟挖坟能力好强……看了半天,才知道是2年前的帖子了……不过也很经典
The brother upstairs has an amazing ability to dig up old posts... After reading for a long time, I just realized it's a post from two years ago... But it's also very classic
|
|
2009-10-31 15:26 |
|