Fixed longest word code to accept groups of digits as 'words'