Build, test, and debug regular expressions
This regex matches an entire string consisting solely of word characters (letters, digits, underscores) and spaces, capturing the full text in group 1. It is commonly used to validate single-line fields such as a region name, rejecting special characters, punctuation, and newlines. The \z anchor ensures the match extends to the absolute end of the string, disallowing a trailing newline unlike $.