I use the regular expression which matches both alphabets and digits.
prog = re.compile(r'^\w+$')
How can I just match ASCII alphabets only?
You must replace \w by [a-zA-Z]
\w
[a-zA-Z]