Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用匹配字母和数字的正则表达式。
prog = re.compile(r'^\w+$')
我怎样才能只匹配 ASCII 字母?
您必须替换\w为[a-zA-Z]
\w
[a-zA-Z]