Originally posted by beetle
var pattern = /mailto:([^"]+)"/;
var pattern = /mailto:(\.+?)"/;
Either should work
Hmm, /mailto:([^"]+)"/ should work perfectly, but just to be sure, make it case insensitive.
/mailto:(\.+?)"/ on the other hand shouldn't work - you escape the fullstop from being any character to being just a fullstop. You'll not catch any valid address that way.
// This would be better:
// But I really suggest you do it in this way instead:
/* Why? Because that way, even though you'll not get full email address validation out of it, you'll at least make sure you get a full address. */