Why I need to use reg-ex if I can use for loops s = "Please contact [email protected] for assistance" email = [i for i in s.split(' ') if '@' in i]
cause in other cases you can have @ symbol in no email words forma example. Regular expressions can specify a more complex email format, analysing all the components in an email, not only that it has an @
No. There was another name on that response earlier; it switched around 13:00 UTC. That answer also has a typo; it needs a \ for the 2nd 'w'.
I understand trouble with for loop, but also you have mistake. If we have sample like this: s= 'Sasha Veledzimovich [email protected], [email protected], [email protected]' You code will provide e-mail with dot at the end. We can fix it pat=r"[\w\.-][email protected][w\.-]+\.[\w]+" Also you have parenthesis. They are not nessessary. If we use re.findall we have emails separated by groups. For example : ('python', 'gmail.url', '.com')
Did you just answer your own question like it was to somebody else?
Why are my users being logged as [object Object] when logging my array/user instead of giving me the values [name, age]?
JS in sololear is latest version or older? What do we use often VAR or LET and CONST?? I Have VAR is no longer used is it true??
C++ Question re stringstream
Как сравнивать строки в Phyton?