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



On Thu, Mar 26, 2020 at 4:27 AM Niels Liisberg <nli@xxxxxxxxxxxxxxxxx> wrote:

I found that the regex C library on IBM i is compatible with PCRE - used in
Pearl, PHP and SQL REGEXP_REPALCE etc.

so when you test your regex, you can use https://regex101.com/ and select
PCRE as flavor.

Maybe someone can confirm this...

I have not actually coded anything using the C functions myself, but
everything I have ever read, including archives of this list, suggest
that those functions implement POSIX regex, not PCRE.

Example message from the archives, including a response from the
esteemed Scott Klement:

https://archive.midrange.com/rpg400-l/201402/msg00066.html

OP mentioned something about POSIX in "the documentation", but I have
never seen documentation that explicitly states "POSIX". The phrase
that I have seen quoted many, many, many times is

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

You can find this in the manual here:

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rtref/sc415607.pdf

(substitute the version of your choice; this family of functions
hasn't changed in basically forever, and isn't likely to ever change).

Mentioning those Unix commands, as well as repeatedly referring to
"basic" and "extended" regular expressions, is tantamount to saying
"POSIX regex".

John Y.

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.