update keys regex to work when there is no trailing word break