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); }