Article View: adobe.scripting.indesign
Article #15838Re: Email address hyphenation
From: Jens_W_Schulze
Date: Fri, 07 Nov 2003 15:13
Date: Fri, 07 Nov 2003 15:13
17 lines
1423 bytes
1423 bytes
> b.) Is there a way to search for a mail address by making use of
> VB-scripting? Has anyone discovered a regular expression to
> find a mail address?
Should be something like this, untested by myself:
function isValidEmail(emailAddress) {
var re =
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1
,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})
)$/
return re.test(emailAddress);
}
The first occurence when searching with google:
http://www.google.de/search?hl=de&ie=UTF-8&oe=UTF-8&q=regular+expression+ema
il+address&spell=1
Technical Details
Message-ID:
<47016BF0283D2090992A180AFEDF1B01@in.webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2cce436b.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,3600ed9e680fd642 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-11-07 07:37:59 PST From: Jens_W_Schulze@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Email address hyphenation Message-ID: <47016BF0283D2090992A180AFEDF1B01@in.webx.la2eafNXanI> Date: Fri, 7 Nov 2003 07:13:11 -0800 References: <2cce436b.-1@webx.la2eafNXanI> Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit