Merge pull request #1776 from YRFT/patch-1

Fix typo
This commit is contained in:
Ilya Kantor 2020-03-21 09:14:12 +03:00 committed by GitHub
commit 0d0908f4d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ alert( str.match(regexp) ); // #121212,#AA00ef
The problem is that it finds the color in longer sequences:
```js run
alert( "#12345678".match( /#[a-f0-9]{6}/gi ) ) // #12345678
alert( "#12345678".match( /#[a-f0-9]{6}/gi ) ) // #123456
```
To fix that, we can add `pattern:\b` to the end: