I would like to know how to parse several double numbers from a string, but string can be mixed, for instance: String s = "text 3.454 sometext5.567568more_text"
.
The standard method (Double.parseDouble
) is unsuitable. I've tried to parse it using the isDigit
method, but how to parse other characters and .
?
thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…