You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a quick tour, a few things I think are missing:
explain groups in section 5
introduce logical negation and logical OR (|)
In the last section, to the question "Come up with a regular expression which checks whether a username is valid. In order to be valid, a username must be between 6 and 16 characters in length and contain only upper or lower case (English) letters, underscores, or hyphens.", "^[a-zA-Z_-]{6,16}$" is not considered a valid answer, where I think it should be
In the last section, to the question "Come up with a regular expression which checks whether the entered value is a (valid) hex value. In order to be valid, a hex value must be either 3 or 6 characters in length, and can contain only numbers or the lowercase letters a-f. The value may optionally be prefixed by a '#' in which case it should be 4 or 7 characters in length.", "^#?[0-9a-f]{3}[0-9a-f]{0,3}$" is accepted as a valid answer, whereas I think it is incorrect (strings of e.g. 5 characters would be accepted).
In the last question, to the question "We assume that a valid web URL may begin with "http://", "https://", or neither. After this follows the domain name, which as in the case of the previous email example should consist of one or more upper or lower case letters, numbers, or hypens which are then followed by a dot, and then by another two to six characters which should be lower case letters or dots. Following that is an optional directory/file section which we simplify here to be zero or more forward slashes, upper or lower case letters, numbers, underscores, spaces, dots, or hyphens.", the provided answer "^(https?:\\/\\/)?([0-9A-z\\.-]+)\\.([a-z\\.]{2,6})[\\/ A-z0-9_\\.-]*$" is slightly different since it allows for dots in the domain part, which is not mentioned by the question.
lookaheads are not introduced in the course, but is used in one of the questions of the last section.
one thing that I very often use is capturing groups. You don't really introduce them. The email adress or url examples could be recycled to illustrate them, I think.
Pretty nice job anyway!
The text was updated successfully, but these errors were encountered:
It took me a while to get back to this, but just wanted to say thanks again for the review Joel. Greatly appreciated!
All your feedback was 100% valid and on point. I've refined each of those (3) applied questions slightly based on your suggestions, and 3 out of the 4 remaining points were/are already on my to-do list. Hopefully I'll get around to those soon too.
After a quick tour, a few things I think are missing:
"^[a-zA-Z_-]{6,16}$"
is not considered a valid answer, where I think it should be"^#?[0-9a-f]{3}[0-9a-f]{0,3}$"
is accepted as a valid answer, whereas I think it is incorrect (strings of e.g. 5 characters would be accepted)."^(https?:\\/\\/)?([0-9A-z\\.-]+)\\.([a-z\\.]{2,6})[\\/ A-z0-9_\\.-]*$"
is slightly different since it allows for dots in the domain part, which is not mentioned by the question.Pretty nice job anyway!
The text was updated successfully, but these errors were encountered: