You are limited by the Functions you can use in SP, there is no .split()
function
See: http://www.viewmaster365.com/365coach/#/Calculated_Column_Functions_List
You can test/develop in Excel, then copy paste your Formula to SP
PS. copy/paste that site, It will be gone 1/1/2018