Python re module challenge regex string | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Python re module challenge regex string

Admittedly my regex is not strong enough to quickly discern what it is logically doing. I finally want to actually figure it out but I can't remember the regex string they use. So.. I was hoping someone can remember some of the regex strings the python challenges use to check against the 'from:funlearning@sololearn.com' string? <-- that probably isn't the address either but it is close to that for all purposes as i'm interested only in the regex used. If I come across it again i'll just scribble it down but i've done some challenges lately just for it to appear again and i haven't got it!

15th Mar 2017, 6:33 AM
Elric Hindy
Elric Hindy - avatar
5 Answers
+ 8
You might want to check my regex prime checker and understand how it is applied :) https://code.sololearn.com/cgEoWC8lFuCk/ (oh my, what an unfortunate link key :D)
15th Mar 2017, 7:07 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 8
From what I recall, the answer there is an email address, specifically. That the one?
15th Mar 2017, 7:44 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
great code Kuba, think I have commented on some of your code before. I understand regex...if you give me enough time to view it, I just can't remember the one from the challenges and want to find it again so I can figure it out properly! maybe challenge me and eventually it'll come up and someone will write it down! :)
15th Mar 2017, 7:10 AM
Elric Hindy
Elric Hindy - avatar
0
yup, that one
15th Mar 2017, 7:45 AM
Elric Hindy
Elric Hindy - avatar
0
got it again in a challenge woot! \S+?@\S+ \S: match any character +: match the last thing 1 or more times ?: match it as few times as possible.. don't actually know how that works with the + but ok.. @: match the @ symbol \S match any character after the @ +: match it 1 or more times basically it'll pull the full string for any string with an @ in it somewhere.....
17th Mar 2017, 4:28 AM
Elric Hindy
Elric Hindy - avatar