Regular Expressions - Match Letters of the Alphabet

Tell us what’s happening:
This lesson is confusing because it asks you to match all characters in the string, but the supposed solution doesn’t account for the period at the end of the sentence. I wasted a bunch of time trying to figure out what was wrong because I kept trying to add the period to the regex check, but apparently it only wants the user to check [a-z].
Should the solution not account for the period at the end of the sentence?

Your code so far

let quoteSample = "The quick brown fox jumps over the lazy dog.";
let alphabetRegex = /[a-z]./ig; // Change this line
let result = quoteSample.match(alphabetRegex); // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Regular Expressions - Match Letters of the Alphabet

Link to the challenge:

I had assumed based on the lessons thus far, that they were asking for all characters in the string to be matched. As I had not made it to the section on ‘non-letter’ matching, I of course did not use the regular expression correctly for that.

The title of the challenge is “Match Letters of the Alphabet.”

I understand. It’s just the way the text of the lesson is worded, talking about matching “characters” that made it seem like the period should be included. It’s a simple mistake, but if I made it, surely others could be confused as well. It would be simpler if they removed the period from the string, to avoid confusion.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.