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