From 2bd3ec1db88a96b9d984bdb1c4a94075b60ff6f5 Mon Sep 17 00:00:00 2001 From: Hitesh Date: Wed, 29 Oct 2025 18:40:47 +0530 Subject: [PATCH] fix(curriculum) : Fixed Wrong Comment of Backreferences Example (#63219) --- .../6733c5f20cc9584cada942a4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/blocks/lecture-working-with-regular-expressions/6733c5f20cc9584cada942a4.md b/curriculum/challenges/english/blocks/lecture-working-with-regular-expressions/6733c5f20cc9584cada942a4.md index 806b2efb820..361d7514fc2 100644 --- a/curriculum/challenges/english/blocks/lecture-working-with-regular-expressions/6733c5f20cc9584cada942a4.md +++ b/curriculum/challenges/english/blocks/lecture-working-with-regular-expressions/6733c5f20cc9584cada942a4.md @@ -64,7 +64,7 @@ In a `replace` call, you achieve a backreference by using a dollar sign (`$`) fo ```js const regex = /free(co+de)camp/i; -console.log("freecoooooooodecamp".replace(regex, "paid$1world")); // paidcooooooooworld +console.log("freecoooooooodecamp".replace(regex, "paid$1world")); // paidcoooooooodeworld ``` We have now successfully preserved an unknown number of `o` characters when converting `freecodecamp` into `paidcodeworld`. But backreferences aren't just limited to the replace call. You can actually use them directly in a regular expression.