Use match instead of split