diff --git a/12_Day_Regular_expressions/12_day_regular_expressions.md b/12_Day_Regular_expressions/12_day_regular_expressions.md index ef83882..7fdacd7 100644 --- a/12_Day_Regular_expressions/12_day_regular_expressions.md +++ b/12_Day_Regular_expressions/12_day_regular_expressions.md @@ -313,13 +313,13 @@ const pattern = /\d+/g // d is a special character which means digits const txt = 'This regular expression example was made in January 12, 2020.' const matches = txt. match(pattern) -console.log(matches) // ["12", "2020"], this is not what we want +console.log(matches) // ["12", "2020"], this is what we want ``` ### One or more times(+) ```js -const pattern = /\d+/g // d is a special character which means digits +const pattern = /\d+/g // + is a special character that matches one or more occurences of the preceding element const txt = 'This regular expression example was made in January 12, 2020.' const matches = txt. match(pattern) console.log(matches) // ["12", "2020"], this is not what we want