fix regex for validating words

previous fix did not work for accented characters