OK, so off line I got a couple of comments about the very short solution.
Here's how to get there on you own. It might be cheating, but it's soooooo much easier.
I made a table with the example in it. Selected the column and used recode.
In Recode I used replace string, and turned on the regular expressions.
In the recode dialog I turned on both scripting options (bottom right)
Then saved the script to the script window, copied the little bit and pasted it here. (well, verified it worked and then pasted it.)
Huge thanks to @ErnestPasour : )
Screen Shot 2020-02-14 at 9.19.49 AM.png
Screen Shot 2020-02-14 at 9.20.09 AM.png
oh, and there is that little bit using "\." rather than "." alone. The backslash is an escape character, and keeps from replacing everything with "_". That's the only bit of regex knowledge needed to make this work.
JMP Systems Engineer, Health and Life Sciences (Pharma)