Fix some platform dependence

@seriousamlqz Please review
If you don't want to use a regular expression I suggest you use Apache Commons Lang's StringUtils.split.