I would like to see if a . exists in a string followed by a number
E.g 123.456 = True
E.g 123456. = False
E.g 123456 = False
E.g 123.456. = True
Any Regex genius out there?
I would like to see if a . exists in a string followed by a number
E.g 123.456 = True
E.g 123456. = False
E.g 123456 = False
E.g 123.456. = True
Any Regex genius out there?
\.(?=[0-9])
matches a dot iff it's followed by a digit. In Java, that is
Pattern regex = Pattern.compile("\\.(?=[0-9])");
Matcher regexMatcher = regex.matcher(subjectString);
foundMatch = regexMatcher.find();
\.\d?Regex would be '\\.\\d' I believe