× 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.



That is just riduculous to say you should stay away from REGEX on the iSeries. I use it at least a few times a week in my programs, and I have no problems with it. You just need to understand what you are doing.

One thing about REGEX is that most systems/Languages have there own implementation, some good some bad. At least IBM tried to follow the POSIX standard when they implemented REGEX. Granted there are some better flavors out there, at least they did not make up a new one.

*-------------
Aaron,

If I were to convert you REGEX to run on the iSeries, I came up with:
([[:graph:]][[:graph:]]{40,}|.{1,40})([[:space:]]+|$)

Be sure to compile it as Extended.

Chris Beck


Paul.Nicolay@xxxxxxxxxx 9/21/2008 1:09:02 PM >>>

Scott,

I also found this out some time ago (see other postings regarding
regex), and it should encourage everyone to stay away from it on
iSeries. Regex is only a valuable function if it would be available in
its most complete form (also see what other systems offer regarding the
"greedy" concept).

Hence for trivial things as splitting a line, one can better write its
own procedure.

Kind regards,
Paul

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: vrijdag 19 september 2008 16:01
To: RPG programming on the AS400 / iSeries
Subject: Re: regexec - chopping a large text string into chunks

Perhaps IBM's biggest crime in this situation is it's HORRIBLE
documentation. The docs say NOTHING about what is and is not supported
in their regcomp() API. The only thing I can find in the docs is this:

"The functions regcomp(), regerror(), regexec(), and regfree() use
regular expressions in a similar way to the UNIX(r) awk, ed, grep, and
egrep commands."


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.