Wednesday, April 07, 2010
Asparagus and potato
Ingredients: potatoes, asparagus, onion, salt & pepper and some fresh chives and rabish on top.
window.addEvent('domready',function(){ $('button').addEvent('click',function(e){ var emails = []; $('text').get('value').replace(/(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?))|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?)/ig, function(match){ match = match.toLowerCase(); if(emails.indexOf(match) != -1) emails.push(match); }); $('text').set('value',emails.join(', ')); }); });DEMO ...paste the text containing emails and press format button.