There’s two different ways to go about this:
-
Build a parser – much work, but very flexible and possibly best performance (depending on implementation)
-
Use a regular expression. In your case this could be something like
(\d{2,3}\.)+\d{2,3}
(shortest string matched should be"111.11"
)
2
solved How to make a this specific Pattern [closed]