I want to match only alphabetic characters, i.e a-z or A-Z, which can also contain spaces. The intent is to match any multiword names like 'Vivek Jha'. I expect the following Regex to work:
re.match(r'^[aA-zZ\s]+$', name)
It works for all the cases but also matches a word: 'Vivek_Jha'
I do not want and underscore to be matched. How is this _ getting matched.
I have worked on Regex in Perl and Tcl, but I think Python is doing something more that I can imagine.