This is my code:
input_text_l = "hjahsdjhas pal sahashjas"
regex= re.compile(r"\s*\¿?(?:pal1|pal2|pal)\s*\??") #THIS IS THE REGEX THAT DOES NOT WORK CORRECTLY
if regex.search(input_text_l):
not_tag = " ".join(regex_tag.split(input_text_l))
#print(not_tag)
else:
pass
And this is a simple diagram on how the regular expression should work.
I hope you can help me with this.

Aucun commentaire:
Enregistrer un commentaire