Inspired by discussion in
http://www.daniweb.com/tutorials/tutorial238544.html
(test cases are from there)
I used my magic pattern matching function transformed from numbers and adding the parts length checking loop.
I like my own solution better, I do not know about you.