#!/usr/bin/env js
var email = " hogehoge@example.com  \n";
print(email);
var localpart = "", domainpart ="";
if (email.match(/\s*(\S+?)@([^@]+)\s*/)) {
    localpart  = RegExp.$1;
    domainpart = RegExp.$2;
    print('local=${localpart}, dom=${domainpart}');
}
    
