regex - JQUERY - remove all words after character -
I need to delete and modify user names
Example:
1) max@custom.com 2) zulu-brain@some.com 3) top.master@other.com
The result should be:
1) Max 2) ZuluBrain 3) Topmaster
I have to clean the character and special characters after all ".", "-", "# "
What is the best way?
A steady example:
var username = "max@custom.com"; Username.replace (/ [^ a-zA-Z 0- 9] + / g, '');
The name should be cleaned but how can I remove everyone after "@"?
An example
var user name = "Zulu -Big "can use something. Com ".split ('@') [0] .replace (/ [^ a-zA-Z 0-9] + / g, '');
Comments
Post a Comment