Add a missing 0

This commit is contained in:
duianto 2018-11-21 15:23:38 +01:00 committed by GitHub
parent 924ec1e19f
commit 5ba5f8b79b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ let reg = /your regexp/g;
let str = "color: #3f3; background-color: #AA00ef; and: #abcd"; let str = "color: #3f3; background-color: #AA00ef; and: #abcd";
alert( str.match(reg) ); // #3f3 #AA0ef alert( str.match(reg) ); // #3f3 #AA00ef
``` ```
P.S. This should be exactly 3 or 6 hex digits: values like `#abcd` should not match. P.S. This should be exactly 3 or 6 hex digits: values like `#abcd` should not match.