For example I want to check that my when I split my string that the first part only contains numbers and decimal points.
I have done the following
You can use this regex:
\\d+(\\.\\d+)*
Code:
if(parts_s1[0].matches("\\d+(\\.\\d+)*") {...}