A1:- @echo off
- set str=I love,bbs;bathome.net
- for %%a in (%str%) do (goto main)
- :main
- set str1=%str:~0,1%
- set str2=%str:~2,4%
- set str3=%str:~7,3%
- set str4=%str:~11,7%
- set str5=%str:~19,3%
- echo %str1% %str2% %str3% %str4% %str5%
- pause
复制代码 A2:- @echo off
- set str=I love,bbs;bathome.net
- for %%a in (%str%) do (goto main)
- :main
- set str1=%str:~19,3%
- echo %str1%
- pause
复制代码
|