Skip to content

Commit ab17e9d

Browse files
a2937gikfnaomi-lgbt
authored
feat(curriculum): add extra space capturing (freeCodeCamp#55841)
Co-authored-by: Krzysztof G. <[email protected]> Co-authored-by: Naomi the Technomancer <[email protected]>
1 parent 3cbafc1 commit ab17e9d

18 files changed

+255
-66
lines changed

curriculum/challenges/_meta/learn-regular-expressions-by-building-a-spam-filter/meta.json

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,68 +85,72 @@
8585
"title": "Step 19"
8686
},
8787
{
88-
"id": "64221007887f38213fa57827",
88+
"id": "66bb6467b4b7381178420970",
8989
"title": "Step 20"
9090
},
9191
{
92-
"id": "642213bf8d38b0227ed6ab0b",
92+
"id": "64221007887f38213fa57827",
9393
"title": "Step 21"
9494
},
9595
{
96-
"id": "64233060735ddf06451c5c8c",
96+
"id": "642213bf8d38b0227ed6ab0b",
9797
"title": "Step 22"
9898
},
9999
{
100-
"id": "64233094a1293c079b5b0996",
100+
"id": "64233060735ddf06451c5c8c",
101101
"title": "Step 23"
102102
},
103103
{
104-
"id": "6423322e71f8d108608005cb",
104+
"id": "64233094a1293c079b5b0996",
105105
"title": "Step 24"
106106
},
107107
{
108-
"id": "6423331f0527840934183aba",
108+
"id": "6423322e71f8d108608005cb",
109109
"title": "Step 25"
110110
},
111111
{
112-
"id": "642335220b7d830a69eb59fb",
112+
"id": "6423331f0527840934183aba",
113113
"title": "Step 26"
114114
},
115115
{
116-
"id": "642335d232d7690b2d67dbaf",
116+
"id": "642335220b7d830a69eb59fb",
117117
"title": "Step 27"
118118
},
119119
{
120-
"id": "64233d08f234a310e73f9496",
120+
"id": "642335d232d7690b2d67dbaf",
121121
"title": "Step 28"
122122
},
123123
{
124-
"id": "642344dc9390c712080432c7",
124+
"id": "64233d08f234a310e73f9496",
125125
"title": "Step 29"
126126
},
127127
{
128-
"id": "64234598ef08dd13114edae5",
128+
"id": "642344dc9390c712080432c7",
129129
"title": "Step 30"
130130
},
131131
{
132-
"id": "6423462975f33b14056583de",
132+
"id": "64234598ef08dd13114edae5",
133133
"title": "Step 31"
134134
},
135135
{
136-
"id": "6423472aeed932150e8984b6",
136+
"id": "6423462975f33b14056583de",
137137
"title": "Step 32"
138138
},
139139
{
140-
"id": "64234797d84734163088961a",
140+
"id": "6423472aeed932150e8984b6",
141141
"title": "Step 33"
142142
},
143143
{
144-
"id": "6423491485db5e1786dd6434",
144+
"id": "64234797d84734163088961a",
145145
"title": "Step 34"
146146
},
147147
{
148-
"id": "642349b5b7bae31af21cd5f8",
148+
"id": "6423491485db5e1786dd6434",
149149
"title": "Step 35"
150+
},
151+
{
152+
"id": "642349b5b7bae31af21cd5f8",
153+
"title": "Step 36"
150154
}
151155
]
152-
}
156+
}

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/64221007887f38213fa57827.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 64221007887f38213fa57827
3-
title: Step 20
3+
title: Step 21
44
challengeType: 0
5-
dashedName: step-20
5+
dashedName: step-21
66
---
77

88
# --description--
@@ -174,7 +174,7 @@ const checkMessageButton = document.getElementById("check-message-btn");
174174

175175
const helpRegex = /please help|assist me/i;
176176
--fcc-editable-region--
177-
const dollarRegex = /[0-9]+ (hundred|thousand|million|billion)? dollars/i;
177+
const dollarRegex = /[0-9]+\s*(hundred|thousand|million|billion)?\s+dollars/i;
178178
--fcc-editable-region--
179179

180180
const denyList = [helpRegex, dollarRegex];

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/642213bf8d38b0227ed6ab0b.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 642213bf8d38b0227ed6ab0b
3-
title: Step 21
3+
title: Step 22
44
challengeType: 0
5-
dashedName: step-21
5+
dashedName: step-22
66
---
77

88
# --description--
@@ -169,7 +169,7 @@ const result = document.getElementById("result");
169169
const checkMessageButton = document.getElementById("check-message-btn");
170170

171171
const helpRegex = /please help|assist me/i;
172-
const dollarRegex = /[0-9]+ (?:hundred|thousand|million|billion)? dollars/i;
172+
const dollarRegex = /[0-9]+\s*(?:hundred|thousand|million|billion)?\s+dollars/i;
173173
--fcc-editable-region--
174174

175175
--fcc-editable-region--

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/64233060735ddf06451c5c8c.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 64233060735ddf06451c5c8c
3-
title: Step 22
3+
title: Step 23
44
challengeType: 0
5-
dashedName: step-22
5+
dashedName: step-23
66
---
77

88
# --description--
@@ -163,7 +163,7 @@ const result = document.getElementById("result");
163163
const checkMessageButton = document.getElementById("check-message-btn");
164164

165165
const helpRegex = /please help|assist me/i;
166-
const dollarRegex = /[0-9]+ (?:hundred|thousand|million|billion)? dollars/i;
166+
const dollarRegex = /[0-9]+\s*(?:hundred|thousand|million|billion)?\s+dollars/i;
167167
const freeRegex = /free money/i;
168168

169169
--fcc-editable-region--

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/64233094a1293c079b5b0996.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 64233094a1293c079b5b0996
3-
title: Step 23
3+
title: Step 24
44
challengeType: 0
5-
dashedName: step-23
5+
dashedName: step-24
66
---
77

88
# --description--
@@ -177,7 +177,7 @@ const result = document.getElementById("result");
177177
const checkMessageButton = document.getElementById("check-message-btn");
178178

179179
const helpRegex = /please help|assist me/i;
180-
const dollarRegex = /[0-9]+ (?:hundred|thousand|million|billion)? dollars/i;
180+
const dollarRegex = /[0-9]+\s*(?:hundred|thousand|million|billion)?\s+dollars/i;
181181
--fcc-editable-region--
182182
const freeRegex = /free money/i;
183183
--fcc-editable-region--

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/6423322e71f8d108608005cb.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 6423322e71f8d108608005cb
3-
title: Step 24
3+
title: Step 25
44
challengeType: 0
5-
dashedName: step-24
5+
dashedName: step-25
66
---
77

88
# --description--
@@ -163,7 +163,7 @@ const result = document.getElementById("result");
163163
const checkMessageButton = document.getElementById("check-message-btn");
164164

165165
const helpRegex = /please help|assist me/i;
166-
const dollarRegex = /[0-9]+ (?:hundred|thousand|million|billion)? dollars/i;
166+
const dollarRegex = /[0-9]+\s*(?:hundred|thousand|million|billion)?\s+dollars/i;
167167
--fcc-editable-region--
168168
const freeRegex = /fr[e3][e3] mon[e3]y/i;
169169
--fcc-editable-region--

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/6423331f0527840934183aba.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 6423331f0527840934183aba
3-
title: Step 25
3+
title: Step 26
44
challengeType: 0
5-
dashedName: step-25
5+
dashedName: step-26
66
---
77

88
# --description--
@@ -160,7 +160,7 @@ const result = document.getElementById("result");
160160
const checkMessageButton = document.getElementById("check-message-btn");
161161

162162
const helpRegex = /please help|assist me/i;
163-
const dollarRegex = /[0-9]+ (?:hundred|thousand|million|billion)? dollars/i;
163+
const dollarRegex = /[0-9]+\s*(?:hundred|thousand|million|billion)?\s+dollars/i;
164164
--fcc-editable-region--
165165
const freeRegex = /fr[e3][e3] m[o0]n[e3]y/i;
166166
--fcc-editable-region--

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/642335220b7d830a69eb59fb.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 642335220b7d830a69eb59fb
3-
title: Step 26
3+
title: Step 27
44
challengeType: 0
5-
dashedName: step-26
5+
dashedName: step-27
66
---
77

88
# --description--
@@ -179,7 +179,7 @@ const result = document.getElementById("result");
179179
const checkMessageButton = document.getElementById("check-message-btn");
180180

181181
const helpRegex = /please help|assist me/i;
182-
const dollarRegex = /[0-9]+ (?:hundred|thousand|million|billion)? dollars/i;
182+
const dollarRegex = /[0-9]+\s*(?:hundred|thousand|million|billion)?\s+dollars/i;
183183
--fcc-editable-region--
184184
const freeRegex = /\sfr[e3][e3] m[o0]n[e3]y\s/i;
185185
--fcc-editable-region--

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/642335d232d7690b2d67dbaf.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 642335d232d7690b2d67dbaf
3-
title: Step 27
3+
title: Step 28
44
challengeType: 0
5-
dashedName: step-27
5+
dashedName: step-28
66
---
77

88
# --description--
@@ -197,7 +197,7 @@ const result = document.getElementById("result");
197197
const checkMessageButton = document.getElementById("check-message-btn");
198198

199199
const helpRegex = /please help|assist me/i;
200-
const dollarRegex = /[0-9]+ (?:hundred|thousand|million|billion)? dollars/i;
200+
const dollarRegex = /[0-9]+\s*(?:hundred|thousand|million|billion)?\s+dollars/i;
201201
--fcc-editable-region--
202202
const freeRegex = /(?:^|\s)fr[e3][e3] m[o0]n[e3]y\s/i;
203203
--fcc-editable-region--

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-regular-expressions-by-building-a-spam-filter/64233d08f234a310e73f9496.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: 64233d08f234a310e73f9496
3-
title: Step 28
3+
title: Step 29
44
challengeType: 0
5-
dashedName: step-28
5+
dashedName: step-29
66
---
77

88
# --description--
@@ -195,7 +195,7 @@ const result = document.getElementById("result");
195195
const checkMessageButton = document.getElementById("check-message-btn");
196196

197197
const helpRegex = /please help|assist me/i;
198-
const dollarRegex = /[0-9]+ (?:hundred|thousand|million|billion)? dollars/i;
198+
const dollarRegex = /[0-9]+\s*(?:hundred|thousand|million|billion)?\s+dollars/i;
199199
const freeRegex = /(?:^|\s)fr[e3][e3] m[o0]n[e3]y(?:$|\s)/i;
200200
--fcc-editable-region--
201201

0 commit comments

Comments
 (0)