Fixes #41 by using regex to strip the trailing underscores instead of giving an error message.