使用python来做正则表达式:
import re
txt = "sdf DRE 2423 sdf"
#Check if the string has any characters from a to z lower case, and A to Z upper case:
x = re.findall("[a-zA-Z]", txt)
print(x)
if x:
print("Yes, there is at least one match!")
else:
print("No match")
[a-zA-Z]: Returns a match for any character alphabetically between a and z, lower case OR upper case
结果如下:
如果觉得不错,就点赞或者关注或者留言~
谢谢~