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



Hi John,

Interesting links that you shared here. I already knew
"regular-expressions.info", but never had a look at "POSIX Basic Regular
Expressions". I will have a closer look at that tomorrow.

If IBM followed the Linux regcomp(), then regcomp() should support "\s",
and "[:space:]" shouldn't it?

If nothing helps I am going to open a PMR and ask IBM for help.

Too bad, that the pattern options of regcomp() are not described anywhere.

Regards,

Thomas.

Am 04.11.2019 um 19:00 schrieb John Yeung:
On Mon, Nov 4, 2019 at 2:46 AM Thomas Raddatz <thomas.raddatz@xxxxxx> wrote:

That would pretty well explain why "\s" does not work. So far I could not find any documentation of regcomp() or regexec() explaining the supported options. The only hint is "The functions regcomp(), regerror(), regexec(), and regfree() use regular expressions in a similar way to the UNIX awk, ed, grep, and egrep commands.".

You're right that is only a hint. I think it is a sloppy and only
minimally helpful way to indicate what kind of regular expressions are
supported.

Probably the best you can do is assume IBM modeled their regcomp() and
other regex functions after Unix, and therefore check Unix/Linux
documentation. For example:

https://linux.die.net/man/3/regcomp

Also, here's an explanation of the difference between "basic" and
"extended" POSIX regex (both of which are incredibly rudimentary
compared to the PCRE regex that most modern languages support):

https://www.regular-expressions.info/posix.html

John Y.



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.