Skip to content

Commit 12cc61f

Browse files
authored
Merge pull request #3135 from leviding/patch-5
fix: shash -> backslash
2 parents 2dbb4f5 + 9c0337d commit 12cc61f

File tree

1 file changed

+4
-4
lines changed
  • 9-regular-expressions/13-regexp-alternation/03-match-quoted-string

1 file changed

+4
-4
lines changed

9-regular-expressions/13-regexp-alternation/03-match-quoted-string/task.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Create a regexp to find strings in double quotes `subject:"..."`.
44

5-
The strings should support escaping, the same way as JavaScript strings do. For instance, quotes can be inserted as `subject:\"` a newline as `subject:\n`, and the slash itself as `subject:\\`.
5+
The strings should support escaping, the same way as JavaScript strings do. For instance, quotes can be inserted as `subject:\"` a newline as `subject:\n`, and the backslash itself as `subject:\\`.
66

77
```js
88
let str = "Just like \"here\".";
@@ -18,11 +18,11 @@ Examples of strings to match:
1818
```js
1919
.. *!*"test me"*/!* ..
2020
.. *!*"Say \"Hello\"!"*/!* ... (escaped quotes inside)
21-
.. *!*"\\"*/!* .. (double slash inside)
22-
.. *!*"\\ \""*/!* .. (double slash and an escaped quote inside)
21+
.. *!*"\\"*/!* .. (double backslash inside)
22+
.. *!*"\\ \""*/!* .. (double backslash and an escaped quote inside)
2323
```
2424

25-
In JavaScript we need to double the slashes to pass them right into the string, like this:
25+
In JavaScript we need to double the backslashes to pass them right into the string, like this:
2626

2727
```js run
2828
let str = ' .. "test me" .. "Say \\"Hello\\"!" .. "\\\\ \\"" .. ';

0 commit comments

Comments
 (0)