× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott K.,

I did come across the Regular Expression stuff in C after I found and converted
the Delphi source. I was tight on time and what I had worked so I threw it
aside.

I came across a regular express pattern that was something like 10 lines long.
It was suppose to have come from the Internet standard itself and was suppose to
check for all cases of the standard.  Only problem is that I can't seem to find
it again. Darn...

Thanks for the article link and doing the work.  I did not come across that when
I asked about email validation a few weeks ago, but I will give it a gander when
I get the time.

-- Scott J.

> -----Original Message-----
> From: rpg400-l-bounces+sjohnson=highsmith.com@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces+sjohnson=highsmith.com@xxxxxxxxxxxx]On Behalf
> Of Scott Klement
> Sent: Friday, November 21, 2003 3:03 PM
> To: RPG programming on the AS400 / iSeries
> Subject: RE: Historical Question
>
>
>
>
> On Fri, 21 Nov 2003, Scott Johnson wrote:
>
> > I asked about email validation a few weeks ago. And it can
> become a very deep
> > subject in a hurry.  Everybody has their own way of doing
> it.  The best way to
> > do it is to use something called Regular Expression.  Which
> RPGIV does not
> > currently support.
>
> First of all, I disagree that a Regular Expression is the
> "best" way to do
> this.  In fact, I'd be willing to wager that your regular
> expression does
> not correctly handle the e-mail address.
>
> Second, you CAN use Regular Expressions in RPG by calling the RegComp,
> RegExec, etc routines from the ILE C runtime library.
>
>
> > I did eventually find some Delphi code that was very
> promising.  I took
> > that and converted it to RPG IV.  Below are the results.
> Now this just
> > does "syntax" checking. It will not check if the email
> address is really
> > valid.  I have not thoroughly checked this code to make
> sure it works in
> > ALL cases, but it has work for me so far.  So if you find
> any bugs or
> > such, please let me know.
>
> Actually, that code looks pretty good...   I'm not going to
> fully analyze
> it and compare it against the standards, but the state machine that it
> uses appears to take things like quotes into account, which means that
> it'll work much better than the Regular Expression methods
> that I've seen.
>
> You might be interested in that VALMAIL service program that
> I mentioned
> earlier in this thread.  It does more or less the same thing that your
> validation program is doing, except that it also looks up the
> domain name
> and makes sure that it exists...
>
> http://www.iseriesnetwork.com/resources/clubtech/index.cfm?fus
eaction=ShowNewsletterIssue&ID=17632

Good Luck



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.