How to trim and split?