problem : atleast 2 char string wherein 1 char should be between a-k , second char should a number divisible by 3 and then any digit or character.
Why does above program gives Matched?
Code:
import re patt=re.compile(r"[a-k][0369][a-zA-Z0-9#]*") m=patt.search("aaa9#") if(m!=None): print("Matched") else: print("Not Matched")
Comment