Added split function as an alternative to using Regex for testing.