Change RexExp
This commit is contained in:
parent
808c8c48b2
commit
46b87fa702
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user