JavaScript Regular Expressions in JavaScript Validating a Form Form Validation

wc93
wc93
24,868 Points

The JS RegEx hex color challenge says /#[A-F\d]{6}/ does not meet the requirements?? Why?

The JS RegEx hex color challenge says /#[A-F\d]{6}/ does not meet the requirements?? Why? Seems to work when I return the test(text). I can't think of a 6 character hex color that it would not work nor can I think of anything invalid that would be seen as valid. Enlighten me please.

1 Answer

wc93
wc93
24,868 Points

needs starts and ends with plus case insensitive flag... /^#[A-F\d]{6}$/i