rem: author.QueryInterface(Ci.nsIWritablePropertyBag2); var open = s.indexOf("("); var close = s.indexOf(")"); var email = trimString(s.substring(0,open)) || null; author.setPropertyAsAString("email", email); var name = null; if (open >= 0 && close > open) name = trimString(s.substring(open+1,close)); author.setPropertyAsAString("name", name); 
add: author.QueryInterface(Ci.nsIFeedPerson);  var chars = trimString(s); var matches = chars.match(/(.*)\((.*)\)/); var emailCheck = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (matches) { var match1 = trimString(matches[1]); var match2 = trimString(matches[2]); if (match2.indexOf("mailto:") == 0) match2 = match2.substring(7); if (emailCheck.test(match1)) { author.email = match1; author.name = match2; } else if (emailCheck.test(match2)) { author.email = match2; author.name = match1; } else {  author.name = match1 + " (" + match2 + ")"; } } else { author.name = chars; if (chars.indexOf('@')) author.email = chars; } 
context: function rssAuthor(s,author) {  author.QueryInterface(Ci.nsIWritablePropertyBag2);  var open = s.indexOf("(");  var close = s.indexOf(")");  var email = trimString(s.substring(0,open)) || null;  author.setPropertyAsAString("email", email);  var name = null;   if (open >= 0 && close > open)     name = trimString(s.substring(open+1,close));  author.setPropertyAsAString("name", name);  return author;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0ec7282d8d11e75bef7489697a6a3885361cab40/FeedProcessor.js/clean/toolkit/components/feeds/src/FeedProcessor.js