- split your string on space to get
Logging
andv0.12.4
- remove (substring)
v
fromv0.12.4
- split
0.12.4
on dot (usesplit("\\.")
since dot is special in regex) - you can also parse each
"0"
"12"
"4"
to integer (Integer.parseInt
can be helpful).
4
solved Parsing String and Int in java