Practice 7 Practice 7 - Extract Email Address Bad solution?

Hello, I was doing this exercise, and after I complete it, I wanted to check the solution.

The problem was , the original phrase is “Please use the following address to contact me john.doe@localcompany.com, it’s the company email"

and the solution has “Please use the following address to contact me john.doe@localcompany.com on the company email"

The difference between these phrase is that the first has a comma, so the solution gives “john.doe@localcompany.com,”

I wanted to see another solution instead of mine because I’m sure there is a better answer

Hello,
Could you please elaborate your question? What is expected output?

This is the exercise:

" Extract the email address from a string (without using RegEx)

Given a string containing one email address, create a workflow to extract the email address without using regular expressions.

Note: For input please use a String variable with the following value “Please use the following address to contact me john.doe@localcompany.com, it’s the company email" "

but when you use the solution given, it uses another phrase ( “Please use the following address to contact me john.doe@localcompany.com on the company email") , so the output is correct, giving "john.doe@localcompany.com " but if you substitute the phrase with one who was given, the result is : “john.doe@localcompany.com,”