使用python来做正则表达式:
import re
txt = "werew asdfs IIHHHLL 234"
#Check if the string has other characters than a, r, or n:
x = re.findall("[^arn]", txt)
print(x)
if x:
print("Yes, there is at least one match!")
else:
print("No match")
字符[^arn]: Returns a match for any character EXCEPT a, r, and n
结果如下:
如果觉得不错,就点赞或者关注或者留言~
谢谢~