#!/usr/bin/env js
var email = " hogehoge@example.com  \n";
print(email);
email = email.trim();
print(email);
var localpart = "", domainpart ="";
if (atpos >= 0 && atpos == e.lastIndexOf('@')) {
localpart  = e.substring(0, atpos);
    domainpart =  e.substr(atpos+1);
  }
    
print('local=${localpart},dom=${domipart}');
