From 46b87fa7022894061d55c64177b9b78c2a026e3e Mon Sep 17 00:00:00 2001 From: Artyom Abubakirov Date: Mon, 2 Jul 2018 17:13:52 +0500 Subject: [PATCH] Change RexExp --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index f6073be..8e5a05a 100755 --- a/server.js +++ b/server.js @@ -56,7 +56,7 @@ server.listen(port, function() { function minifyRoomHash(hash) { - let text = hash.replace(new RegExp('[^A-Z^a-z^0-9]', 'g'), ''); + let text = hash.replace(new RegExp('[\\W_]', 'g'), ''); text += 'roomID'; return text.slice(0, 6); }