I am trying to match a unicode string, such that the unicode will not match the string literal.
def validate(username):
if "admin" in username:
return False
else:
return True
validate(username)
If I pass username="\u0061\u0064\u006d\u0069\u006e", it will return False, since it is converting the unicode, and then matching, and "\u0061\u0064\u006d\u0069\u006e" is unicode for admin. Is there a way to match before converting? The input is not converted, it starts off as unicode. I have tried using regex, but have not succeeded.