Create Scripted Field using substring before "."

Ok, looked it up. Apparently you can't use split. Need to use REGEX or another method.