更新时间:2022-11-11 10:52:13
使用正则表达式:课程:正则表达式(Java™教程>基本类) [ ^ ]
然后它是微不足道的:
Use a Regex: Lesson: Regular Expressions (The Java™ Tutorials > Essential Classes)[^]
Then it's trivial:
^\d+
是所有模式你需要。
Java
轻轻提供 Character.isDigit [ ^ ]方法。你可以反复调用它。
Java
gently provides the Character.isDigit[^] method. You may call it iteratively.