Improved regex. Updating test code.