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



Just to clarify: I did not ask for performance data. I asked only whether
performance had been tested and compared. We can probably infer the answer,
so no response is needed. Sorry if I confused things.

On a side note: I see (but do not select) these random taglines prior to
typing my message. I don't know why my computer's in a Douglas Adams mood.
It's not me. Honest. :)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"There is a theory which states that if ever anyone discovers exactly what
the Universe is for and why it is here, it will instantly disappear and be
replaced by something even more bizarrely inexplicable.

There is another theory which states that this has already happened."
-- The Hitchhiker's Guide to the Galaxy



I am not going to provide performance comparisons, Dennis. These and
other
measures would be part of on-site acceptance-testing and as such would
provide figures more relevant than any I might generate.


Regards,
Joihn McKay mba

----- Original Message -----
From: "Dennis Lovelady" <iseries@xxxxxxxxxxxx>
To: "'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
Sent: Friday, August 13, 2010 2:10 PM
Subject: RE: Regular Expressions


Thank you for your responses, John. While I don't see the benefit of
using
one individual's API under the conception that another's API is
difficult
to
learn/use, I salute you making this available. I am not some other
person,
and this may exactly fit that other person's needs!

But I did notice that you avoided the performance question. I'm just
saying. :)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"For a moment, nothing happened. Then, after a second or so, nothing
continued to happen."
-- The Hitchhiker's Guide to the Galaxy


I had three objectives for producing this implementation.

The first objective was to use a single call instead of REGCOMP,
REGEXEC
and REGFREE.. This is closer to the "standard" implementation found
in
other
languages and scripts. It also makes regular expressions more
accessible to
those who are unfamiliar with the IBM api's.

My second objective was to remove the confusion / ambiguity
caused
by
differing character sets / ccsid's. While I cannot guarantee that
my
implementation will work successfully across all the character sets
/
ccsid's, it is more robust than the IBM-supplied api's.

My third objective was to widen the range of regular expressions
available here. Allied to this was the need to improve the
documentation
for RPG developers.

Two of the examples illustrate a return position rather than 1
(alpha, h
and alp25a, \d, both of which return position 4).

Messages which can be of help in determining whether a regular
expression is valid or not can be obtained from the return code. A
negative
return code (range -1 to -18) will indicate the message based on the
IBM
documentation. These return codes are in the readme, which can be
viewed on
line.

I agree with you in that "the hard part is in coming up with the
right
expression". This is the case in all implementations of regular
expressions. Different implementations use different (albeit very
similar)
syntaxes and there is a set of standard escape characters and
punctuation
characters.

I had considered an implementation of REGEXEC on its own, but
this
cannot be done without a related implementation of REGCOMP. If you
think
this to be useful, I will look at it again.


Regards,
John McKay mba

----- Original Message -----
From: "Dennis Lovelady" <iseries@xxxxxxxxxxxx>
To: "'RPG programming on the IBM i / System i'" <rpg400-
l@xxxxxxxxxxxx>
Sent: Friday, August 13, 2010 10:03 AM
Subject: RE: Regular Expressions


Thanks, John. I've seen implementations like this before (but not
public
domain). I cannot download and restore a save file to the systems
I
access,
so there is conjecture here. That conjecture can be solved by
having
a
FAQ
for the product. I presume that you're doing REGCOMP, REGEXP,
REGFREE
with
each operation. Have you measured the performance of this against
the
alternative (REGCOMP at the beginning of a process, REGEXP for
each
of x
million rows/columns/whatevers, REGFREE at the end?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.