[Answered ]-Python re.search return None and Object

2👍

With Python 2.x you should designate your regexes to be unicode if you are using national characters:

regex = ur"^[a-zA-Z-_áéíóúÁÉÍÓÚÑñ][a-zA-Z0-9-_áéíóúÁÉÍÓÚÑñ\s]*$"

and also use the following format while testing on the shell:

s = u'Éstíló'
👤Selcuk

Leave a comment