From 986134946cb79f941c9f3e38adb59636335a6db0 Mon Sep 17 00:00:00 2001 From: codedust <codedust@users.noreply.github.com> Date: Fri, 8 Jun 2018 02:48:54 +0200 Subject: [PATCH] Update comment for escaping special regex characters --- app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 300e6a9..3f3e0a7 100644 --- a/app.js +++ b/app.js @@ -1047,7 +1047,8 @@ var firmwarewizard = function() { return 0; }); - // prepare the matches for use in regex (join by pipe and escape dots) + // prepare the matches for use in regex (join by pipe and escape regex special characters) + // according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions var matchString = matches.map(x => x.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|'); // match image files. The match either ends with -- GitLab