Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit a979465

Browse files
authored
Fix examples in readme
1 parent b714371 commit a979465

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ console.log(ourLongText.replace(re));
3535

3636
Note the double backslashes in the example string contents, which render as a single backslash.
3737
```js
38-
RegExp.escape("The Quick Brown Fox"); // "The\\ Quick\\ Brown\\ Fox"
39-
RegExp.escape("Buy it. use it. break it. fix it.") // "Buy\\ it\\.\\ use it\\.\\ break\\ it\\.\\ fix\\ it\\."
38+
RegExp.escape("The Quick Brown Fox"); // "\\x54he\\x20Quick\\x20Brown\\x20Fox"
39+
RegExp.escape("Buy it. use it. break it. fix it.") // "\\x42uy\\x20it\\.\\x20use\\x20it\\.\\x20break\\x20it\\.\\x20fix\\x20it\\."
4040
RegExp.escape("(*.*)"); // "\\(\\*\\.\\*\\)"
4141
RegExp.escape("。^・ェ・^。") // "。\\^・ェ・\\^。"
42-
RegExp.escape("😊 *_* +_+ ... 👍"); // "😊\\ \\*_\\*\\ \\+_\\+\\ \\.\\.\\.\\ 👍"
43-
RegExp.escape("\\d \\D (?:)"); // "\\\\d \\\\D \\(\\?\\:\\)"
42+
RegExp.escape("😊 *_* +_+ ... 👍"); // "😊\\x20\\*_\\*\\x20\\+_\\+\\x20\\.\\.\\.\\x20👍"
43+
RegExp.escape("\\d \\D (?:)"); // "\\\\d\\x20\\\\D\\x20\\(\\?\\x3a\\)"
4444
```
4545

4646
## Cross-cutting concerns

0 commit comments

Comments
 (0)