New course! Every coder should learn Generative AI!
Try a free lesson+ 2
CHALLENGE: extract email addresses from string
write a program which will extract email addresses from a string and prints them. example: String = "hello my name is xyz and here is my email: [email protected]. Please contact me or my friend ([email protected])." Output: [email protected] [email protected] https://code.sololearn.com/c85FY237omX6/?ref=app
3 Answers
+ 3
Niall, He's not asking for help on how to do it. This is a "Challenge" discussion: he's challenging people to write their own program.
+ 3
oh, my mistake. I was trying to help. 😂
- 2
https://stackoverflow.com/questions/13796451/how-to-extract-a-string-between-two-delimiters
Find the index of the first and last characters and then take a substring from between them.