1
00:00:00,110 --> 00:00:00,760
Welcome back.

2
00:00:00,780 --> 00:00:06,300
I know the last lesson was a relatively long one, but very important to what we're doing and that's

3
00:00:06,300 --> 00:00:10,610
practicing regex within these exercises and lessons.

4
00:00:10,890 --> 00:00:17,160
So now that we're able to pull out our email data within a string value in JavaScript, it's going to

5
00:00:17,160 --> 00:00:22,780
be relatively easy to output that content back into our finished text area.

6
00:00:23,160 --> 00:00:25,740
And there's also a few other things that we still need to do.

7
00:00:25,740 --> 00:00:30,140
So our text and set that in our text to email data.

8
00:00:30,390 --> 00:00:31,620
So it's as easy as that.

9
00:00:31,950 --> 00:00:34,040
And let's try our application out.

10
00:00:34,470 --> 00:00:36,300
And this case, we're only going to have the four.

11
00:00:36,330 --> 00:00:37,560
We do get emails.

12
00:00:38,160 --> 00:00:39,960
So there is actually still one problem.

13
00:00:39,990 --> 00:00:43,590
So if I do that, I'm actually going to end up with 16 emails.

14
00:00:43,800 --> 00:00:45,630
So I want to remove out the duplicates.

15
00:00:45,840 --> 00:00:47,250
So that's problematic.

16
00:00:47,250 --> 00:00:49,740
And it's always best practices to promote.

17
00:00:49,920 --> 00:00:50,970
Remove out the.

18
00:00:51,940 --> 00:01:01,060
Extra emails, and we can also add in a span here and class, so this will tell us how many emails that

19
00:01:01,060 --> 00:01:05,050
we do have and I'm going to select our Java scripts.

20
00:01:05,800 --> 00:01:14,410
So setting up our contact counter equals document and query selector so that we have a account for the

21
00:01:14,410 --> 00:01:15,580
number of emails.

22
00:01:16,000 --> 00:01:18,400
And we can do this really easily, of course, as well.

23
00:01:18,430 --> 00:01:27,820
So just as we're updating our inner HTML or in our text of our email data, we can also say that emails

24
00:01:27,820 --> 00:01:39,070
found so we can say emails found and add in a number and we've got a number there within the data length

25
00:01:39,070 --> 00:01:39,410
value.

26
00:01:39,670 --> 00:01:46,470
So refresh that and we can see emails found for emails in text so we get that value coming out.

27
00:01:46,840 --> 00:01:52,100
So coming up next, so it's as easy as that to output it and output our generator.

28
00:01:52,120 --> 00:01:55,570
And there's one thing that is missing that we don't want duplicate emails.

29
00:01:55,570 --> 00:01:57,910
We want to be able to remove those duplicate emails.

30
00:01:58,150 --> 00:02:02,920
So show you how to do that in the upcoming lesson, where we going to check for duplicates and remove

31
00:02:02,920 --> 00:02:10,240
out any of the duplicates and add in and create a unique string being returned back of email addresses?

32
00:02:10,480 --> 00:02:14,200
Because most of the time when you've got a document, you've got email addresses, you're trying to

33
00:02:14,200 --> 00:02:17,230
extract those out, you don't want to have all the duplicates.

34
00:02:17,230 --> 00:02:18,960
So let's take care of that in the upcoming lesson.

35
00:02:19,210 --> 00:02:19,720
So go ahead.

36
00:02:19,720 --> 00:02:25,870
In this lesson and the section, add into your application the ability to count the number of emails

37
00:02:25,870 --> 00:02:32,120
that you found, as well as output that value so the user can easily select that content.

38
00:02:32,170 --> 00:02:34,150
So coming up next, removing of duplicates.
