use regex for split function