Welcome back.
I know the last lesson was a relatively long one, but very important to what we're doing and that's
practicing regex within these exercises and lessons.
So now that we're able to pull out our email data within a string value in JavaScript, it's going to
be relatively easy to output that content back into our finished text area.
And there's also a few other things that we still need to do.
So our text and set that in our text to email data.
So it's as easy as that.
And let's try our application out.
And this case, we're only going to have the four.
We do get emails.
So there is actually still one problem.
So if I do that, I'm actually going to end up with 16 emails.
So I want to remove out the duplicates.
So that's problematic.
And it's always best practices to promote.
Remove out the.
Extra emails, and we can also add in a span here and class, so this will tell us how many emails that
we do have and I'm going to select our Java scripts.
So setting up our contact counter equals document and query selector so that we have a account for the
number of emails.
And we can do this really easily, of course, as well.
So just as we're updating our inner HTML or in our text of our email data, we can also say that emails
found so we can say emails found and add in a number and we've got a number there within the data length
value.
So refresh that and we can see emails found for emails in text so we get that value coming out.
So coming up next, so it's as easy as that to output it and output our generator.
And there's one thing that is missing that we don't want duplicate emails.
We want to be able to remove those duplicate emails.
So show you how to do that in the upcoming lesson, where we going to check for duplicates and remove
out any of the duplicates and add in and create a unique string being returned back of email addresses?
Because most of the time when you've got a document, you've got email addresses, you're trying to
extract those out, you don't want to have all the duplicates.
So let's take care of that in the upcoming lesson.
So go ahead.
In this lesson and the section, add into your application the ability to count the number of emails
that you found, as well as output that value so the user can easily select that content.
So coming up next, removing of duplicates.