Hi there Hope all well. Kindly asking for assessment for my markup for the second skill test in this series. Codepen here.
Thank you in advance
Hi there Hope all well. Kindly asking for assessment for my markup for the second skill test in this series. Codepen here.
Thank you in advance
Hi again @Phil_G
General notes:
^
and $
to denote start and end. These are implied in the pattern
attribute.Pattern 1: The following two strings match your pattern, but are not allowed by the task description: a.BCDE
/ a.bc
How could you improve your pattern to exclude them?
Pattern 2: This one is fine, but you don’t need to escape the @
(only the .
)
Pattern 3: I guess you deliberately allow more formats than asked for. For example 1 (222)333-3333
shouldn’t be possible. Be aware that \s
not only matches a space but all of these characters: [\f\n\r\t\v\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]
. You’re also missing .
as a separator.
Michael
Hi @mikoMK
Valuable feedback as per usual! Thank you for the review.
RegEx definitely a weakness to improve on so I’m not surprised this submission was lacking.
I will have a closer look at your points and update the code with improvements. Will @ when done if you can spare a few secs to review again?
All the best,
Phil
Yeah, regexes are hard, but very powerful and interesting, once you’re starting to get them.
Sure! I’m eager to have a second look.