If I input the string 2006-03894 from a file, how can I trim the string so that the result is 2006?

Thank you,

Ed