0
There is a mistake in code, excercise 7/8 of theme "Regular expressions"
Instead of this pattern = r"([\w\.-]+)@([\w\.-]+)(\.[\w\.]+)" should be that pattern = r"([\w\.\-]+)@([\w\.\-]+)(\.[\w\.]+)" because "-" a meta-symbol as well, if we do not enclose it, hyphen turns the group into a diapason
1 Resposta
+ 2
Aren't hyphens that are not in between characters interpreted literally? Escaping can make it clearer, but it's not an error to not escape