Change RexExp
This commit is contained in:
1 parent
808c8c48b2
commit
46b87fa702
1 file changed
+1
-1
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user