slight expansion of problem 474 > regex in Python is not ideal > may switch to a ruby solution