Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有多个采用以下格式的字符串:
“在修订 ###。”
其中### 可以是一位、两位、三位或四位数字。
如何解析该字符串cmd以仅获取数字?
cmd
试试这个(cmd shell脚本):
设置“字符串=在修订版###。” for /f "tokens=3delims=." %%i in ("%string%") do set "number=%%i" 回声(%数字%