let username = ''; username = username.replace(/s/g,'_'); username = username.replace(/-/g,'.'); username = username.match(/[a-zA-Z0-9.s]+/g).join('_');