added option to specify min and max number of characters per word. Modified regex implementation.