I have string like
8.123.351 (Some text here)
You are not very clear. I make some assumptions to create a pattern.
Now we create your expression
Match 1 to 3 digits at the start of the row
There is optionally (the
? after the group) a dot and one to three more digits
This part with the dot can be repeated 0 or more times (replace the
? with a
See it here on Regexr
If you want to read some basics about regular expressions, I wrote a blog post about that.