fixed pattern example for quantifier inRegExp

it was confusing for beginners like me in regEx ,so I fixed it
pull/487/head
SHUBHAM VERMA 3 years ago committed by GitHub
parent 4e5ccf57e1
commit f359e2e1f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -377,7 +377,7 @@ We can specify the length of the substring we look for in a text, using a curly
```js ```js
const txt = 'This regular expression example was made in December 6, 2019.' const txt = 'This regular expression example was made in December 6, 2019.'
const pattern = /\\b\w{4}\b/g // exactly four character words const pattern = /\b\w{4}\b/g // exactly four character words
const matches = txt.match(pattern) const matches = txt.match(pattern)
console.log(matches) //['This', 'made', '2019'] console.log(matches) //['This', 'made', '2019']
``` ```

Loading…
Cancel
Save