Solved regex issue with ^ and | when using String.split()