java regex: find pattern of 1 or more numbers followed by a single

java, regex

Solution

I think this is the answer to your question:

String searchText = "asdgasdgasdg a121341234.sdg asdg as12..dg a1234.sdg ";
searchText.matches("\\d+\\.[^.]");

This will match "121341234." and "1234." but not "12."

Problem

I'm having a java regex problem. how can I find pattern of 1 or more numbers followed by a single . in a string?

Original source