WEBVTT 00:00:00.000 --> 00:00:02.000 Here's a pretty good answer. 00:00:02.000 --> 00:00:08.000 We definitely want to match single words and then you can possibly have 1 hypen 00:00:08.000 --> 00:00:09.000 and then you can have more letters if you like. 00:00:09.000 --> 00:00:14.000 This regular expression definitely matches well-liked. 00:00:14.000 --> 00:00:18.000 It also matches html--maybe the h, t, and m will match the first part, 00:00:18.000 --> 00:00:20.000 and the l will match the second part. 00:00:20.000 --> 00:00:25.000 It definitely rejects a-b-c and a--b. 00:00:25.000 --> 00:00:29.000 However, 1 problem with this regular expression is that it does not accept 00:00:29.000 --> 00:00:32.000 single letter words like "a" or "i". 00:00:32.000 --> 00:00:35.000 To see why, just look at these 2 plus signs. 00:00:35.000 --> 00:00:38.000 This requires 1 or more letters here and 1 or more letters there, 00:00:38.000 --> 00:00:40.000 That's at least 2 letters. 00:00:40.000 --> 00:00:45.000 We might be tempted to fix it up by making 1 of these a star, 00:00:45.000 --> 00:00:49.000 but now we mistakenly accept things like just "-a". 00:00:49.000 --> 00:00:52.000 No letters here, the hypen, and then some more letters-- 00:00:52.000 --> 00:00:54.000 well, that didn't work. 00:00:54.000 --> 00:00:55.000 What if I try to make the other one a star? 00:00:55.000 --> 00:01:00.000 Well, dual problem--now we'll mistakenly accept things like "a-". 00:01:00.000 --> 00:01:02.000 Well, this is a bit of a challenge. 00:01:02.000 --> 00:01:08.000 What we really want is for this hypen and the second word to be grouped together, 00:01:08.000 --> 00:01:10.000 and either they're both there or they're not. 00:01:10.000 --> 00:01:16.000 It's as if I really want this question mark to apply to both the hyphen 00:01:16.000 --> 00:01:18.000 and also the [a - z]+. 00:01:18.000 --> 00:01:22.000 We don't know how to do that yet, but you'll get a chance after we've learned how 00:01:22.000 --> 00:01:24.891 to fix this up in the homework.