I am currently working on a project where I have to generate some email addresses on the fly in javascript, based on some generic strings with various characters.
Say i have a couple of group names:
var groupname1: "This is my first group";
var groupname2: "This.is.yet@another@!#¤%&/() group";
I need to figure out which characters to strip from the names, so i can make them email-valid
function removeWeirdCharsAndReturnEmailAddress(name){
var emailValidString = [DO REGEX/OTHER MAGIC HERE];
return emailValidString + '@domain.org';
}