Welcome to CodeGuru forums!
If it is Crystal Reports, then :

I would use the Left and the Length functions, as :


Left({Tablex.Fieldx}, Length({Tablex.Fieldx}) - 4)