Skip to content

Commit 9e23edf

Browse files
authored
Merge pull request Asabeneh#8 from npnjuguna/npnjuguna-match-example-fix
match string function example fix
2 parents 2893300 + 963d2ce commit 9e23edf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

readMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,8 @@ let txt = 'In 2019, I run 30 Days of Pyhton. Now, in 2020 I super exited to star
10061006
let regEx = /\d+/ // d with escape character means d not a normal d instead acts a digit
10071007
// + means one or more digit numbers,
10081008
// if there is g after that it means global, search everywhere.
1009-
console.log(text.match(regEx)) // ["2", "0", "1", "9", "3", "0", "2", "0", "2", "0"]
1010-
console.log(text.match(/\d+/g)) // ["2019", "30", "2020"]
1009+
console.log(txt.match(regEx)) // ["2", "0", "1", "9", "3", "0", "2", "0", "2", "0"]
1010+
console.log(txt.match(/\d+/g)) // ["2019", "30", "2020"]
10111011
```
10121012
20. *repeat()*: it takes a number argument and it returned the repeated version of the string.
10131013
```js

0 commit comments

Comments
 (0)