
CODE: [Copy to clipboard]用findstr[class] 字符类别: 任何在字符集中的字符
[^class] 补字符类别: 任何不在字符集中的字符
[x-y] 范围: 在指定范围内的任何字符
CODE: [Copy to clipboard][ Last edited by huahua0919 on 2008-8-7 at 02:17 PM ]@echo off
:start
set /p a=please input number:
echo %a%|findstr "[^1-5afx]" &&echo 输入错误&&goto start
echo 输入正确
pause
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |