From a979465de4c5bea0816030b4067c6eaeff50b64b Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Tue, 26 Nov 2024 16:32:22 -0800 Subject: [PATCH] Fix examples in readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 52a9de3..01926f4 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,12 @@ console.log(ourLongText.replace(re)); Note the double backslashes in the example string contents, which render as a single backslash. ```js -RegExp.escape("The Quick Brown Fox"); // "The\\ Quick\\ Brown\\ Fox" -RegExp.escape("Buy it. use it. break it. fix it.") // "Buy\\ it\\.\\ use it\\.\\ break\\ it\\.\\ fix\\ it\\." +RegExp.escape("The Quick Brown Fox"); // "\\x54he\\x20Quick\\x20Brown\\x20Fox" +RegExp.escape("Buy it. use it. break it. fix it.") // "\\x42uy\\x20it\\.\\x20use\\x20it\\.\\x20break\\x20it\\.\\x20fix\\x20it\\." RegExp.escape("(*.*)"); // "\\(\\*\\.\\*\\)" RegExp.escape("。^・ェ・^。") // "。\\^・ェ・\\^。" -RegExp.escape("😊 *_* +_+ ... 👍"); // "😊\\ \\*_\\*\\ \\+_\\+\\ \\.\\.\\.\\ 👍" -RegExp.escape("\\d \\D (?:)"); // "\\\\d \\\\D \\(\\?\\:\\)" +RegExp.escape("😊 *_* +_+ ... 👍"); // "😊\\x20\\*_\\*\\x20\\+_\\+\\x20\\.\\.\\.\\x20👍" +RegExp.escape("\\d \\D (?:)"); // "\\\\d\\x20\\\\D\\x20\\(\\?\\x3a\\)" ``` ## Cross-cutting concerns