Change RexExp

This commit is contained in:
Artyom Abubakirov 2018-07-02 17:13:52 +05:00
parent 808c8c48b2
commit 46b87fa702

View File

@ -56,7 +56,7 @@ server.listen(port, function() {
function minifyRoomHash(hash) { 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'; text += 'roomID';
return text.slice(0, 6); return text.slice(0, 6);
} }