Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

retrieve domain from email address node js

var email = "john.doe@email.com";
var name   = email.substring(0, email.lastIndexOf("@"));
var domain = email.substring(email.lastIndexOf("@") +1);

console.log( name );   // john.doe
console.log( domain ); // email.com
Comment

PREVIOUS NEXT
Code Example
Javascript :: limitar la cantidad de decimales en javascript 
Javascript :: nodejs check if variable is undefined 
Javascript :: npm express async handler 
Javascript :: auto clicker for cookie clicker 2 
Javascript :: find max of array of objects key 
Javascript :: javascript check object methods 
Javascript :: regex to check the phone number javascript 
Javascript :: js array intersection object 
Javascript :: give div event listener functional component 
Javascript :: javascript check if key exists in object 
Javascript :: how to keep scrolling with javascript 
Javascript :: reverse key and value in object js 
Javascript :: javsacript split string at position 
Javascript :: javascript escape html string 
Javascript :: nestjs Built-in HTTP exceptions 
Javascript :: js clamp 
Javascript :: javascript location redirect 
Javascript :: navigate to another page in javascript 
Javascript :: math format comma separated in javascript 
Javascript :: javascript express server 
Javascript :: enzyme debug 
Javascript :: how to show only time in hours and minutes only in javascript 
Javascript :: vue ref add class 
Javascript :: scroll to bottom of div javascript 
Javascript :: js make value positive 
Javascript :: ajax image post ekleme 
Javascript :: vuejs post 
Javascript :: js load multiple images 
Javascript :: gulp del 
Javascript :: javascript print object pretty 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =