Update task.md

Grammar, spelling, and some clarifications
This commit is contained in:
Michal Frystacky 2018-10-29 16:24:31 -08:00 committed by GitHub
parent 0235308c48
commit 950af8cf39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
# Find color in the format #abc or #abcdef # Find color in the format #abc or #abcdef
Write a regexp that matches colors in the format `#abc` or `#abcdef`. That is: `#` followed by 3 or 6 hexadimal digits. Write a RegExp that matches colors in the format `#abc` or `#abcdef`. That is: `#` followed by 3 or 6 hexadecimal digits.
Usage example: Usage example:
```js ```js
@ -11,4 +11,4 @@ let str = "color: #3f3; background-color: #AA00ef; and: #abcd";
alert( str.match(reg) ); // #3f3 #AA0ef alert( str.match(reg) ); // #3f3 #AA0ef
``` ```
P.S. 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.