Re: Search method or RegExp?



RobG wrote:
[...] "Ben Amada" [...] wrote:
Hi all. I know very little about regular expressions, but wanted to use one
to validate an email address a user would be entering before the form is
submitted.

Rigorous validation of e-mail address is impossible,

Correct, client-side. Server-side you stand a very good chance.

the best you can do client-side is a rough test

It would not be too difficult to implement the address specification of
RFC2822 in a Regular Expression though. I have done that twice or more
now here, so searching the archives is probably not a bad idea.

then send an email to the address to verify it.

It has been my observation that is possible server-side to get a reliable
test result in most cases without sending an e-mail, using an automated
SMTP probe, provided the testing server is, or has access to, a properly
configured MX.

But, as you say, only sending an e-mail and having the receiver confirm
it can make sure that e-mails to the mailbox are actually read.


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
.



Relevant Pages

  • Re: Printing from an ASP.NET page
    ... One the original page, provide checkbox to let user ... As for the report printing, do you want it to print at the client-side ... our server-side web application doesn't have ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Printing from an ASP.NET page
    ... users will not like having to confirm closing the window for each report. ... The original server-side printing, using .NET printing methods works so ... do you want it to print at the client-side ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Server-side modem connection
    ... the server under the credentials of IUSR, ... This following code works perfectly in a client-side ... > Dim MLSes ... However, by changing this to a server-side code, it fails: ...
    (microsoft.public.scripting.vbscript)
  • Re: create (and write into) an xml file from data given in a form
    ... What matters are the capabilities of the runtime environment, ... on the client-side, in memory, so to speak. ... Using DOM methods (but with XML, ... But that is what *server-side* scripting has been devised for. ...
    (comp.lang.javascript)
  • Re: textbox lost focus in aspnet
    ... I believe you're mixing up server-side and client-side functionality here. ... Anything that ahppens on the client, such as handling an HTML ...
    (microsoft.public.dotnet.framework.aspnet)