Caveat: All below possible answers assume at least two dots in your values! If that is not the case, you need to include and IFERROR()
for Excel where LibreCalc will show empty.
LibreCalc

Formula in B1
:
=REGEX(A1;"(?:^[^.]*\.|\.[^.]*$)";"";"g")
A little explaination of the pattern:
(?:
- Open non-capturing group.
^[^.]*\.
- Start string ancor, followed by zero or more characters other than a literal dot, followed by a dot.
|
- Or.
\.[^.]*$
- A literal dot, followed but zero or more characters other than a literal dot followed by end string ancor.
)
- Close non-capturing group.
As per this online demo, you can tell that the replacement will now "delete" the marked text.
For your information, the semi-colon is the standard seperator in LibreCalc (and is ofter confused by a comma which is standard seperator for Excel).
Excel 2019/O365

Formula in B1
:
=TEXTJOIN(".",,FILTERXML("<t><s>"&SUBSTITUTE(A1,".","</s><s>")&"</s></t>","//s[position()>1][position()<last()]"))
Though it's a longer alternative to the nice use of LET()
when you would have Excel O365, this works in Excel 2019 also and makes use of TEXTJOIN()
and some XPATH
expressions that means:
//s
- Return all "s" nodes.
[position()>1]
- Position of the node is larger than 1st index AND:
[position()<last()]
- Position of the node is smaller than the last index.
For more information on that construct, I think you can look at this. Previous post.
Note that you can also use this in LibreCalc
but you'd need to use a modified installment since the default function FILTERXML()
has a bug.
Excel in general:
For older installments of Excel you could use:
=MID(A1,FIND(".",A1)+1,FIND("|",SUBSTITUTE(A1,".","|",LEN(A1)-LEN(SUBSTITUTE(A1,".",""))))-FIND(".",A1)-1)
Basically we first determine how many dots are in the string, we then SUBSTITUTE()
the very last one in a pipe-symbol (or any unique character for that matter) before we can FIND()
it's position. If we determine the position of the first dot it's a simple matter of calculation when we provide the start and length parameters in MID()
.
EDIT
After a better explaination from OP's end, it seems his string values will always end on a dot. In such a case you could simply REPLACE()
the first part of a string:
=REPLACE(LEFT(A1,LEN(A1)-1),1,FIND(".",A1),"")
It would also make working in LibreCalc a little easier too:
=REGEX(A1;"^[^.]*\.(.*).$";"$1";"g")