Make regex not support ending in a hyphen.