improved regex (made it more robust); fixed slight bug: empty string '' would incorrectly occur as last item to process; provided tests
revised regex
Merge pull request #17 from barrysteyn/master

improved regex, fixed bug, made tests